Repository navigation
Delete transparency info when img.convert'ing RGB/L to RGBA - #2633
Merged
Merged
Conversation
info['transparency] was not removed when an RGB or L image was converted to RGBA. This could result in unexpected behavior when saving the resulting image. Other image conversions already delete or update the transparency info. There is a shortcut for RGB/L to RGBA which missed this.
Member
While in general this looks good, could you provide simple example with code which leads to unexpected behavior. |
Member
|
@olt I'd like to see this in the further version, but also I'd like to know what exactly the issue is. Could you provide an example of unexpected behavior? |
Member
|
I think this is roughly the same issue as #2702. RGBA images shouldn't have any transparency or palette info, as all of information that should affect the image interpretation is in the pixels themselves. (excepting color profiles. but that's a different can of worms). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
info['transparency]was not removed when an RGB or L imagewas converted to RGBA. This could result in unexpected behavior
when saving the resulting image.
Other image conversions already delete or update the transparency
info. There is a shortcut for RGB/L to RGBA which missed this.