for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AmaTeam\Image\Projection\Image\Adapter\Gd;
use AmaTeam\Image\Projection\API\Image\ImageFactoryInterface;
class ImageFactory implements ImageFactoryInterface
{
/**
* @inheritDoc
*/
public function read($blob)
$resource = imagecreatefromstring($blob);
return new Image($resource);
}
public function create($width, $height)
$resource = imagecreatetruecolor($width, $height);
public static function supported()
return function_exists('imagecreatetruecolor');