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

#2790 + tests #2898

Merged
merged 7 commits into from
Dec 27, 2017
Merged

#2790 + tests #2898

merged 7 commits into from
Dec 27, 2017

Conversation

wiredfool
Copy link
Member

Fixes #2790, #2782 .

Changes proposed in this pull request:

  • Added tests to Fix #2782 #2790
  • Added support in PngInfo for sRGB and cHRM chunks.

else:

# You must either have sRGB or iCCP.
# Disallow sRGB chunks when a iCCP-chunk has been emitted.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> "when an iCCP-chunk"

**gamma**
Gamma, given as a floating point number.

**srgb**
The sRGB rendering intent as a integer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-> "as an integer"

# gamma setting
s = ImageFile._safe_read(self.fp, length)
self.im_info["gamma"] = i32(s) / 100000.0
return s

def chunk_cHRM(self, pos, length):
# chromaticity, 8 unsigned ints, actual value is scaled by 100000
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"100000" -> "100,000" or "100 000"

@wiredfool wiredfool mentioned this pull request Dec 20, 2017
@wiredfool wiredfool added this to the 4.4.0 milestone Dec 20, 2017
@wiredfool wiredfool merged commit bd5f99f into python-pillow:master Dec 27, 2017
@wiredfool wiredfool deleted the pr_2790 branch January 8, 2018 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants