Commit Graph

49 Commits

Author SHA1 Message Date
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
5f2fe6083c
CR feedback: don't use lambda 2016-06-29 17:29:55 -07:00
Konstantin Kopachev
885297d21f
Fix python 3 bytes to string concat error 2016-06-29 14:44:29 -07:00
Konstantin Kopachev
c3b970f046
Ability to skip crc checks for ancillary chunks 2016-06-29 12:24:37 -07:00
homm
1a6c6b1250 tests for icc profile in png 2016-05-12 20:31:54 +03:00
wiredfool
b2800b57a7 spelling typos 2016-05-03 19:46:22 +01:00
Oliver Tonnhofer
0f8d66bc96 add failing test for #1838; extend tests for current transparency behavior 2016-04-19 10:21:48 +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
309ab1fc3d Various Flake8 fixes 2015-07-03 16:22:56 +10:00
Andrew Murray
a06b59bd52 Added various tests 2015-07-03 15:03:25 +10:00
Justin Wilson
e33b5c6355 Added test to check that png with null tRNS value defaults to a zero transparency value. 2015-05-27 09:45:27 -06:00
Andrew Murray
ee34d6843b Further health fixes 2015-04-24 18:24:52 +10:00
Andrew Murray
76fec69eda Removed unnecessary lambdas 2015-04-24 16:02:39 +10:00
Andrew Murray
d1c182cadc Various Flake8 fixes 2015-04-24 09:26:52 +10:00
wiredfool
8c2a7502a4 Correct the name 2015-01-28 10:02:04 -08:00
wiredfool
05fe86654c Added _repr_png method for ipython display hooks 2015-01-28 09:35:31 -08:00
wiredfool
b73c4b9e8b Test change -- different representation for invalid compressed object 2014-12-28 22:50:03 -08:00
Hugo
5e676ea0bd Merge remote-tracking branch 'upstream/master' into flake8
Conflicts:
	Tests/bench_cffi_access.py
	Tests/test_file_palm.py
	Tests/test_format_hsv.py
	Tests/test_image_putdata.py
	Tests/test_locale.py
	Tests/test_mode_i16.py
2014-09-23 16:35:20 +03:00
wiredfool
af672b1d7e Fix for handling P + transparency -> RGBA conversions 2014-09-20 10:27:52 -07:00
hugovk
94da23ea3b Fix tests. test_trns_p() needed assert_image_similar() in place of assert_image_equal() 2014-09-14 20:00:13 +03:00
hugovk
1de128d6b6 Merge branch 'master' into flake8 2014-09-14 10:23:51 +03:00
hugovk
e1c33d3190 Replace lena with hopper 2014-09-04 12:09:52 +03:00
hugovk
1335006cd7 flake8 2014-08-28 14:44:19 +03:00
Fredrik Tolf
2687b5cb8d Test unicode preservation in text chunks. 2014-07-23 08:17:11 -07:00
Fredrik Tolf
823d377e47 Added tests for iTXt saving. 2014-07-23 07:27:51 -07:00
Fredrik Tolf
2b4d91ed53 Added iTXt tests. 2014-07-23 01:09:06 -07:00
hugovk
cf04a9a0d2 Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
hugovk
78003ca473 Update paths to Tests/images/ instead of Images/ 2014-06-23 09:19:29 +03:00
hugovk
3ec505958e Convert old tests to use unittest 2014-06-10 12:10:47 +03:00
hugovk
c9a4272af6 Replace python-imaging with python-pillow (but yet not Coveralls) 2014-06-03 13:02:44 +03:00
wiredfool
0d453d9805 Added test for Palette transparency=0 2014-02-28 16:29:34 -08:00
wiredfool
598bd02650 Tightened up the tests 2014-01-21 20:50:54 -08:00
wiredfool
0492409def don't use bare asserts, don't mask file builtin with local 2014-01-20 13:34:48 -08: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
Alex Clark ☺
ad47ea5a52 Merge pull request #424 from wiredfool/trns-write-bydefault2
Save the transparency header by default for PNGs
2013-12-28 05:57:45 -08:00
wiredfool
d65a2c8018 Save the transparency header by default for PNGs 2013-11-26 15:06:26 -08:00
wiredfool
0356741a29 Now using the rgbT2rgba conversion for L+transparency to RGBA, dropping the palette hack 2013-11-26 13:04:10 -08:00
wiredfool
e12528fb62 dyslexic typo 2013-11-26 12:22:09 -08:00
nikmolnar
d030b4f48a Added a test for issue #421 2013-11-22 16:04:51 -08:00
Christoph Gohlke
fb80d5b267 Circumvent classification of pngtest_bad.png as malware 2013-09-27 16:55:19 -07:00
Vytis Banaitis
febfd1e124 Python3 fix. 2013-08-20 17:09:22 +03:00
Vytis Banaitis
dbf40a0124 Catch truncated zTXt errors. 2013-08-20 15:17:17 +03:00
David Schmidt
5303f0ea66 added tests to cover save of four different png transparencies 2013-03-26 11:24:07 +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
Brian Crowell
a7e3b2e47b py3k: The big push
There are two main issues fixed with this commit:

* bytes vs. str: All file, image, and palette data are now handled as
  bytes. A new _binary module consolidates the hacks needed to do this
  across Python versions. tostring/fromstring methods have been renamed to
  tobytes/frombytes, but the Python 2.6/2.7 versions alias them to the old
  names for compatibility. Users should move to tobytes/frombytes.

  One other potentially-breaking change is that text data in image files
  (such as tags, comments) are now explicitly handled with a specific
  character encoding in mind. This works well with the Unicode str in
  Python 3, but may trip up old code expecting a straight byte-for-byte
  translation to a Python string. This also required a change to Gohlke's
  tags tests (in Tests/test_file_png.py) to expect Unicode strings from
  the code.

* True div vs. floor div: Many division operations used the "/" operator
  to do floor division, which is now the "//" operator in Python 3. These
  were fixed.

As of this commit, on the first pass, I have one failing test (improper
handling of a slice object in a C module, test_imagepath.py) in Python 3,
and three that that I haven't tried running yet (test_imagegl,
test_imagegrab, and test_imageqt). I also haven't tested anything on
Windows. All but the three skipped tests run flawlessly against Pythons
2.6 and 2.7.
2013-01-10 08:46:56 -06:00
Brian Crowell
197885164b py3k: Backport Gohlke's tests to run on 2.6/2.7
Most of the differences are in tobytes/tostring naming and expected
behavior of the bytes() constructor. The latter was usually easy to fix
with the right bytes literal.

This is a good preview of what will have to happen in the Python 3 code.
2013-01-10 08:46:39 -06:00
Brian Crowell
ad784eb808 py3k: Import Christoph Gohlke's test suite
This is Christoph Gohlke's test suite from his personal PIL package found
at http://www.lfd.uci.edu/~gohlke/pythonlibs/.

This is just to bring it in as a separate commit. Future commits will align
it with Pillow.
2013-01-10 08:46:39 -06:00