public function getSourceImageContents(Image $client, $hash, $organizationName, $stackName = null, $format = 'jpg')
    {
        if (!$stackName) {
            return $client->getSourceImageContents($hash, $organizationName);
        }
        $uri = $client->getSourceImageUri($hash, $stackName, $format, null, $organizationName);
        $resp = (new Client())->get($uri);

        return $resp->getBody()->getContents();
    }
public function getSourceImageContents(Image $client, $hash, $organizationName, $stackName = null, $format = 'jpg')
    {
        if (!$stackName) {
            return $client->getSourceImageContents($hash, $organizationName);
        }
        $uri = $client->getSourceImageUri($hash, $stackName, $format, null, $organizationName);
        $resp = (new Client())->get($uri);

        return $resp->getBody()->getContents();
    }
public function getSourceImageContents ( Image $ client , $ hash , $ organizationName , $ stackName = null , $ format = 'jpg' ) { if ( ! $ stackName ) { return $ client -> getSourceImageContents ( $ hash , $ organizationName ) ; } $ uri = $ client -> getSourceImageUri ( $ hash , $ stackName , $ format , null , $ organizationName ) ; $ resp = ( new Client ( ) ) -> get ( $ uri ) ; return $ resp -> getBody ( ) -> getContents ( ) ; }
Download an image.

@param Image  $client
@param string $hash
@param string $organizationName
@param string $stackName        Optional, if not specified the unmodified source is downloaded
@param string $format           Defaults to jpg

@return string The binary data for the image
Download an image .