5 use \Intervention\Image\Size;
18 throw new \Intervention\Image\Exception\NotSupportedException(
19 "GD Library extension not available with this PHP installation."
35 public function newImage($width, $height, $background =
null)
38 $core = imagecreatetruecolor($width, $height);
39 $image = new \Intervention\Image\Image(
new self, $core);
42 $background =
new Color($background);
43 imagefill($image->getCore(), 0, 0, $background->getInt());
56 return new Color($value);
66 return (extension_loaded(
'gd') && function_exists(
'gd_info'));
76 $width = imagesx($core);
77 $height = imagesy($core);
78 $clone = imagecreatetruecolor($width, $height);
79 imagealphablending($clone,
false);
80 imagesavealpha($clone,
true);
82 imagecopy($clone, $core, 0, 0, 0, 0, $width, $height);