Skip to content

Backport PNG/ZIP improvements from PIL repo#95

Merged
aclark4life merged 4 commits intopython-pillow:masterfrom
olt:pil-png-transp-backport
Mar 12, 2013
Merged

Backport PNG/ZIP improvements from PIL repo#95
aclark4life merged 4 commits intopython-pillow:masterfrom
olt:pil-png-transp-backport

Conversation

@olt
Copy link
Copy Markdown
Contributor

@olt olt commented Mar 11, 2013

  • add new FASTOCTREE quantizer with alpha support
  • make ZIP compress level and type configurable
  • support reading/writing PNGs with paletted alpha
  • reduce PNG palette size for images <255 colors

Had to revert 5baa1ac (and a fix for that commit b29326b). Was already handled by the changes.

source https://bitbucket.org/effbot/pil-2009-raclette/commits/3637439d51693c92028a7c4cfa75f5db583de357
https://bitbucket.org/effbot/pil-2009-raclette/commits/5c682473c68352bea416da3e2814081d992f74f8

olt added 4 commits March 11, 2013 19:02
- add new FASTOCTREE quantizer with alpha support
- make ZIP compress level and type configurable
- support reading/writing PNGs with paletted alpha

source https://bitbucket.org/effbot/pil-2009-raclette/commits/3637439d51693c92028a7c4cfa75f5db583de357
limit color and trancparency palette to 2^bits entries, when a PNG is
saved with the 'bits' PNG encoder option
aclark4life added a commit that referenced this pull request Mar 12, 2013
Backport PNG/ZIP improvements from PIL repo
@aclark4life aclark4life merged commit d6f597a into python-pillow:master Mar 12, 2013
@aclark4life
Copy link
Copy Markdown
Member

Thanks for all of this!

@aclark4life
Copy link
Copy Markdown
Member

@d-schmidt
Copy link
Copy Markdown
Contributor

still broken

@aclark4life
Copy link
Copy Markdown
Member

How so?

@d-schmidt
Copy link
Copy Markdown
Contributor

Traceback (most recent call last):
  File "E:\temp\converter.py3", line 224, in shrinkImage
    im.save(outFile, "PNG", transparency=im.info.get('transparency'))
  File "e:\programme\Python32\lib\site-packages\pillow-2.0.0-py3.2-win32.egg\PIL\Image.py", line 1467, in save
    save_handler(self, fp, filename)
  File "e:\programme\Python32\lib\site-packages\pillow-2.0.0-py3.2-win32.egg\PIL\PngImagePlugin.py", line 553, in _save
    transparency = max(0, min(255, im.encoderinfo["transparency"]))
TypeError: unorderable types: bytes() < int()
unorderable types: bytes() < int()

I've finally some time to test the current version against our user-provided images. It crashes if the image has a transparency palette. His solution puts either bytes or an int into the same variables and that doesn't work.
currently working on it.

@aclark4life
Copy link
Copy Markdown
Member

Thank you!

radarhere pushed a commit to radarhere/Pillow that referenced this pull request Mar 5, 2023
Run valgrind tests when GitHub Actions file changes
radarhere pushed a commit to radarhere/Pillow that referenced this pull request Sep 24, 2023
Changed shell commands to better match main repository
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.

3 participants