-
Notifications
You must be signed in to change notification settings - Fork 69
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
[FR] hasTransparency / hasAlpha Method #285
Comments
This probably wasn't as easy as I thought... ;) I was thinking that Imagick's getImageAlphaChannel would give me this, but it returns true if there is an alpha channel, and not whether or not there actually is any transparent pixels in the image. The way I understood your usecase, I think that's maybe what you were after? The way To figure out if there are actual transparent pixels, it looks like the only solution is to loop over all the picture's pixels and analyze the color value. That sounds like a lot of wasted resources (cpu cycles), but... Let me know if my understanding of your usecase was correct, or if the alpha channel thing would be useful. |
The loop over the pixels sounds not really good for performance, thats right. |
Hey,
like we write in Discord. Maybe it’s possible to add a Method to check if the Image has some Transparency.
Thanks!
The text was updated successfully, but these errors were encountered: