-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getImageAlphaChannel
returns incorrect value
#842
Comments
I think To determine if the image has any transparency maybe the following code can help? $alphaRange = $image->getImagick()->getImageChannelRange(Imagick::CHANNEL_ALPHA);
$isTransparent = $alphaRange['minima'] < $alphaRange['maxima']; |
Thank you @ausi! I was just coming around to the same feeling. I'm not super familiar with this library, so it took me most of the day to reason around what was happening. This was a bug reported in our CMS so I'll fix it over there and close things here. Thanks again, that snippet worked perfectly. |
👍 Maybe such a |
Issue description
#798 changed the logic surrounding alpha channels and seems to have caused the
$image->getImagick()->getImageAlphaChannel()
to returntrue
for JPG.What version of Imagine are you using?
1.3.3
What's the PHP version you are using?
What's the imaging library you are using [gd/imagick/gmagick/any]?
imagick
What's the imaging library configuration
Minimal PHP code to reproduce the error:
The exact images I used in this example are below
Output Screenshot
Assets used
The text was updated successfully, but these errors were encountered: