-
-
Notifications
You must be signed in to change notification settings - Fork 770
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
image.hasAlpha() Method? #271
Comments
For PNG images, you can save with an alpha channel or not using: image.rgba(false).write("image-no-alpha.png"); Or is it that you want to detect of there are any non-opaque pixels and decide to save as a JPEG if there are none? |
This. Seems like a good idea, I'll implement it this tomorrow. |
How's this going? Looking forward to this feature! |
Released in v0.4.0 |
Is it possible to add a method for determining if a PNG has a transparency colour channel?
Creating alpha channels when none is required results in unnecessarily large images.
Ideally, the following could be used:
This would either preserve the channel when used remove it when unecessary.
Alternatively you could use it to determine file types:
The text was updated successfully, but these errors were encountered: