Problem with transparent images
billmn opened this issue · comments
I've some problem with imagecache using transparent images (in my case a PNG) ... I give you some example:
Without any method
Without cache:
$image = Image::open($path);
return Response::make($image, 200, ['Content-Type' => $image->mime]);
With cache:
$cached_img = Image::cache(function($image) use ($path)
{
$image->open($path);
return $image;
}, 10, true);
return Response::make($cached_img, 200, ['Content-Type' => $cached_img->mime]);
With resize
Without cache:
$image = Image::open($path);
$image->resize(null, 70);
return Response::make($image, 200, ['Content-Type' => $image->mime]);
With cache:
$cached_img = Image::cache(function($image) use ($path)
{
$image->open($path);
$image->resize(null, 70);
return $image;
}, 10, true);
return Response::make($cached_img, 200, ['Content-Type' => $cached_img->mime]);
Doesn't return mimetype
In my examples, the property $cached_img->mime returns NULL and not the mimetype
Thanks, this was a major bug. But it's fixed now. Please update intervention/image
to the newest version and everything should work fine.
Ok tested, now works fine!
Thank you