-
-
Notifications
You must be signed in to change notification settings - Fork 756
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
.rgba(false) does not work #681
Comments
Same issue here. Any updates? |
To note, this happens if you use I was able to work around it by turning alpha transparency on then explicitly setting the alpha channel for every pixel. |
I think I have found the problem. It appears that the encoder for PNG files are setting both output AND input alpha channel to The solution should be to change Jimp/packages/type-png/src/index.js:50 from I tried to fork it and make the change but one of the tests fail, and I am unable to figure out what the test even does. The important part for me is that the image ends up looking as I expect it to. |
Same happens when I try to save a png with rgba(false). The output is all messed like the attached image above user has shared |
If you're saving PNGs, then you can try the image.colorType(0); // Grayscale without alpha
image.colorType(2); // Truecolor without alpha I'm not Jimp contributor, it's just a thing that I've found out in the docs. |
Expected Behavior
Expect to save the image without the alpha channel.
Current Behavior
Getting an image byte-wise re-interpretted from RGBA to RGB.
Failure Information (for bugs)
Steps to Reproduce
Screenshots
In (and expected out):
Actual out:
Context
Failure Logs
The text was updated successfully, but these errors were encountered: