Skip to content
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

Corrected DdsImagePlugin setting info gamma #4171

Merged
merged 1 commit into from Nov 13, 2019

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Oct 26, 2019

Resolves #4164

The issue reports that the following line fails -

self.im_info["gamma"] = 1 / 2.2

This is understandable, since there is no self.im_info. Presumably, self.info was meant when this was added in #2068.

Setting gamma in info in this way is already done in PNG -

>>> from PIL import Image
>>> im = Image.open("Tests/images/hopper.png")
>>> im.info
{'gamma': 0.45455, 'chromaticity': (0.3127, 0.329, 0.64, 0.33, 0.3, 0.6, 0.15, 0.06), 'dpi': (96, 96)}

@radarhere radarhere added the Bug Any unexpected behavior, until confirmed feature. label Oct 26, 2019
@hugovk hugovk merged commit ce18064 into python-pillow:master Nov 13, 2019
@radarhere radarhere deleted the gamma branch November 13, 2019 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Any unexpected behavior, until confirmed feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DdsImagePlugin fails when dxgi_format == DXGI_FORMAT_BC7_UNORM_SRGB
2 participants