Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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