-
Notifications
You must be signed in to change notification settings - Fork 35
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
Cannot convert an image from greyscale+alpha #35
Comments
@slyrus I think this was fixed by you correct? But before it's closed, I just realized you cannot do the inverse: convert an RGBA image to grayscale+alpha though. I just had to hack in some ugly code to handle this. There should be a way to do what |
Hmm... Ok, in theory I have this now. One problem is that the writing routines (tiff, jpg, etc...) don't seem to support grayscale-alpha yet (but that's a separate problem). The other issue is what to make the default alpha value if we're coercing from something that doesn't have an alpha channel? |
I would signal a condition if it's not possible. I mostly only work with PNG, but for a portable image format library, I don't think you can do anything but signal and have the user handle the condition to their needs. |
Hmm... yes, that's probably a good idea. I added support for tiff, and jpeg just silently ignores the alpha channel - as it does for RGB. Could probably be improved. |
This case form needs a greyscale+alpha case:
opticl/coerce.lisp
Line 206 in e868441
The text was updated successfully, but these errors were encountered: