Commit Graph

60 Commits

Author SHA1 Message Date
Tim Graham
792df283d9 Fix "invalid escape sequence" bytestring warnings in Python 3.6 2016-10-31 11:48:59 -04:00
Jon Dufresne
7992d2a65a Fix BytesWarning discovered while running tests
Discovered using the command:

python -b -m nose -vx Tests/test_*.py
2016-10-22 12:35:44 -07:00
Andrew Murray
d3d29ab2e3 Use truth value when checking for optimize option on save 2016-09-25 21:20:54 +10:00
Alexander Karpinsky
639bdd3c02 Merge pull request #1991 from kkopachev/png-crc-error-ignore
Ability to skip crc checks for ancillary chunks
2016-06-30 17:25:04 +04:00
Konstantin Kopachev
885297d21f
Fix python 3 bytes to string concat error 2016-06-29 14:44:29 -07:00
wiredfool
0ddb0f3c7f Merge pull request #1970 from uploadcare/ignore-decompression-dos
Ignore large text blocks in PNG if LOAD_TRUNCATED_IMAGES is enabled
2016-06-29 22:32:35 +01:00
Konstantin Kopachev
c3b970f046
Ability to skip crc checks for ancillary chunks 2016-06-29 12:24:37 -07:00
wiredfool
6a3acde001 Merge pull request #1909 from uploadcare/png-icc-profile
Get ICC profile from `encoderinfo` while PNG saving
2016-06-25 11:01:53 +01:00
homm
95402143fe ignore large text blocks in PNG if LOAD_TRUNCATED_IMAGES is enabled 2016-06-20 17:33:10 +03:00
Andrew Murray
86828ffd2a Replaced del with pop 2016-06-18 11:25:39 +10:00
homm
989e162ff6 save icc profile from encoderinfo 2016-05-12 20:28:42 +03:00
Oliver Tonnhofer
c773688f37 improve simple palette detection for PNG
- reverts change #1239 which could remove transparency from valid images
  (see test_save_p_transparent_black test case)
- improves simple palette detection to handle images from #1238
2016-04-19 10:21:53 +02:00
wiredfool
90378c8298 Fixing compatibility with the truncated images tests 2016-04-04 05:40:37 -07:00
wiredfool
77da73c90f Catch struct.errors when verifying png files, convert to SyntaxErrors, fixes #1755 2016-04-04 03:08:22 -07:00
Andrew Murray
d21430234e Improved consistency of checks for flush 2015-09-02 23:48:22 +10:00
Andrew Murray
c6b13d294f Flake8 fixes 2015-08-25 22:27:18 +10:00
Andrew Murray
fa73879d19 Changed register calls to use format property 2015-07-04 23:29:58 +10:00
Antony Lee
4e754e9c55 Use logging instead of print.
cf. #1191.

Only TiffImagePlugin and OLEFileIO still rely on (their own) DEBUG flag.
I left TiffImagePlugin as it is because I hope #1059 gets merged in
first, and OLEFileIO because it uses its own logic.

Untested, as usual.
2015-06-29 12:39:50 -07:00
Hugo
b350a2ac95 Merge pull request #1239 from juztin/master
Setting transparency value to 0 when the tRNS contains only null byte(s)
2015-05-27 22:37:29 +03:00
Andrew Murray
3c7e37d2d7 Replaced old-style classes 2015-05-27 00:07:21 +10:00
Justin Wilson
e317a729f3 Setting transparency value to 0 when the tRNS contains only null byte(s) 2015-05-22 16:37:50 -06:00
Andrew Murray
d1c182cadc Various Flake8 fixes 2015-04-24 09:26:52 +10:00
hugovk
0b79c6e24a Remove unreachable code (if 0) 2015-03-05 21:07:16 +02:00
wiredfool
0b75526ffe Limit total text chunk size to 64k 2014-12-29 17:10:27 -08:00
wiredfool
44286ba3c9 Fix for zlib.decompression bomb in iTXt,zTXt, and iCCP chunks 2014-12-28 22:49:52 -08:00
wiredfool
c770984867 Document all the save params for PNG, and their references [ci skip] 2014-11-19 15:35:33 -08:00
Hugo
ae7b765b53 Fix some Landscape.io errors and warnings 2014-10-01 16:50:33 +03:00
hugovk
8de95676e0 flake8 2014-08-26 16:47:10 +03:00
Fredrik Tolf
a9f4e30641 Save detected non-Latin1 characters as iTXt to preserve them. 2014-07-23 07:43:52 -07:00
Fredrik Tolf
c469dd9ae5 Added support for encoding and decoding iTXt chunks. 2014-07-23 00:28:44 -07:00
hugovk
14c2f86873 Rename bytes variable as read_bytes to avoid the built-in function name. 2014-05-21 21:33:49 +03:00
hugovk
d594c0241a Rename len variables as length to avoid the built-in function name. 2014-05-21 20:45:02 +03:00
wiredfool
f8ce951a2d Merge Changes from master 2014-03-04 22:41:36 -08:00
David Schmidt
6457eed2cb overwrite redundant Image palette with new ImageCore Palette after quantize, fixes #513 2014-03-04 21:44:32 -08:00
David Schmidt
232c175bd9 fixes #513 2014-03-04 21:44:32 -08:00
David Schmidt
f848993c89 fixes #528
Accept 0 as transparency value.
2014-02-25 09:50:42 +01:00
Bruno Renié
e1e64904c7 Cleanup handling of ICC profile, more extensive testing 2014-01-19 19:09:40 +01:00
Bruno Renié
0348fcac51 Fix crash on save when icc_profile is None 2014-01-19 16:40:39 +01:00
wiredfool
d65a2c8018 Save the transparency header by default for PNGs 2013-11-26 15:06:26 -08:00
Alex Clark ☺
07f338f194 Merge pull request #315 from d-schmidt/master
fix Issue #312 + gif optimize improvement
2013-08-22 02:54:43 -07:00
Vytis Banaitis
dbf40a0124 Catch truncated zTXt errors. 2013-08-20 15:17:17 +03:00
David Schmidt
b9ab3f5bf4 fix Issue #312
improve palette handling while saving gif and png
2013-08-02 16:32:49 +02:00
David Schmidt
511adfacf7 fix png decode tRNS pattern 2013-03-21 21:00:25 +01:00
David Schmidt
ecd55629be fix indention 2013-03-21 18:47:37 +01:00
David Schmidt
1a40613ca5 fix indention 2013-03-21 18:43:22 +01:00
David Schmidt
09315f263b fixing save of transparency palette png-images 2013-03-21 18:16:00 +01:00
David Schmidt
1ff2b6630a fixed bug with png-images with transparency palette 2013-03-21 16:54:04 +01:00
Oliver Tonnhofer
6a450e303d reduce PNG palette size for images <255 colors
limit color and trancparency palette to 2^bits entries, when a PNG is
saved with the 'bits' PNG encoder option
2013-03-11 20:58:54 +01:00
Oliver Tonnhofer
6537ba19c3 backport PIL's PNG/Zip improvements
- add new FASTOCTREE quantizer with alpha support
- make ZIP compress level and type configurable
- support reading/writing PNGs with paletted alpha

source 3637439d51
2013-03-11 20:33:04 +01:00
Oliver Tonnhofer
c60bb09fcd Revert "Added support for PNG images with transparency palette"
This reverts commit 5baa1ac1b8.
2013-03-11 19:02:54 +01:00