You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 getImageAlphaChannel works, I think you'll get approximately the same result by just checking the file extension.
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.
Yes, I have to find out if the image has some transparent pixels but when this is a big performance issue it's fine to go with the file extension. But of course, png means not transparency that's my only problem.
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: