Commit Graph

96 Commits

Author SHA1 Message Date
Andrew Murray
a83bcec169 Flake8 fixes 2015-12-31 07:27:27 +11:00
wiredfool
253bc038c5 Python 3.2, sigh 2015-12-30 00:45:48 +00:00
wiredfool
31428b7009 Py3 fixes 2015-12-29 23:56:47 +00:00
hugovk
d9c90bba91 Test passes for 2.9.0, fails for 3.0.0 2015-12-29 22:57:36 +00:00
homm
0f87b1f125 suppress and check warning during tests 2015-09-15 04:07:02 +03:00
wiredfool
07d95c3861 Added test for typeerror test for gpsexif 2015-09-10 05:32:11 -07:00
Andrew Murray
3a25b1cd9b Added test for _getexif TypeError 2015-07-29 23:38:26 +10:00
Andrew Murray
2a3a34d2ff Treat MPO with unknown header as base JPEG file 2015-07-19 22:56:04 +10:00
Andrew Murray
309ab1fc3d Various Flake8 fixes 2015-07-03 16:22:56 +10:00
Andrew Murray
ee34d6843b Further health fixes 2015-04-24 18:24:52 +10:00
Andrew Murray
d1c182cadc Various Flake8 fixes 2015-04-24 09:26:52 +10:00
wiredfool
1e040feb1b Adjust buffer size when quality=keep, fixes #148 (again) 2015-01-18 10:56:29 -08:00
Christoph Gohlke
2538fa9e0f Fix AssertionError in TestFileJpeg.test_save_cjpeg 2014-09-29 11:35:46 -07:00
wiredfool
306ad74324 qtables error handling tests 2014-09-24 15:46:16 -07:00
wiredfool
1f377c2ace Merge from master 2014-09-23 09:52:03 -07:00
hugovk
1de128d6b6 Merge branch 'master' into flake8 2014-09-14 10:23:51 +03:00
etienne
416d8e340e Fixed issue #857.
When saving a JPEG and specifying 'keep' for quality or subsampling,
if the source JPEG image is in grayscale mode, don't try to find the
subsampling of the source, because grayscale images don't have any
subsampling (it's only for color components).

For the moment the fix also ignores subsampling of CMYK JPEG because
currently Pillow doesn't support encoding JPEG in YCCK mode (and
subsampling doesn't make sense in CMYK, but Pillow permits saving CMYK
JPEG with subsampling, that's a bug). This fix pass those errors
silently, i.e. it doesn't raise an error when 'keep' is used but it's
not possible to keep the subsampling (because the image is grayscale
or CMYK). I think it's the proper behavior but I'm not sure.
2014-09-02 14:52:25 -07:00
hugovk
42610c0ecd flake8 2014-08-28 17:18:54 +03:00
hugovk
c2f0903627 Correct the correction: RelatedImageWidth=0x1001, RelatedImageLength=0x1002 2014-08-27 11:06:34 +03:00
hugovk
a428321bee flake8 2014-08-27 10:57:40 +03:00
hugovk
d866a29bd8 Correct duplicate EXIF tags: http://www.exiv2.org/tags.html 2014-08-27 10:46:34 +03:00
Eric W. Brown
53b7f6294b First steps toward MPO support.
Allows Pillow to distinguish between JPEGs and MPOs, and provides some
MPO metadata handling. Does not yet handle multiple frames.
2014-07-16 11:36:56 -04:00
hugovk
cf04a9a0d2 Remove unused tearDownModule 2014-07-07 20:03:50 +03:00
Michael Brown
8b365f542a Skip tests if external commands aren't found 2014-06-27 19:11:01 -04:00
Michael Brown
d283f77884 Tests for _save_netpbm, _save_cjpeg and load_djpeg 2014-06-27 19:07:20 -04:00
wiredfool
dfe7ff515f Additional jpeg qtables tests 2014-06-20 01:09:59 -07:00
wiredfool
fcd4c662bf Fixed JPEG qtables test 2014-06-20 00:41:58 -07:00
wiredfool
7dc4dcc9fd Merge from master 2014-06-20 00:34:32 -07: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
Chris Sinchok
70a50907c2 This patch allows a JPEG image to be saved with a specific qtables
value (in dictionary format).

Previously, this would throw a TypeError when checking if the qtables
value was actually a preset. By adding an isStringType check, we can
avoid this error.
2014-05-28 17:21:58 -05:00
hugovk
0c1c620e30 Add test for #647. Fails without fix. 2014-05-21 14:33:28 +03:00
hugovk
aed2646dc2 pep8/pyflakes 2014-05-21 14:32:24 +03:00
wiredfool
5a4808d2d2 test cleanup: don't mask file builtin, data is unused 2014-03-27 16:44:58 -07:00
wiredfool
c7af2bf5b0 Test for #577 2014-03-27 16:39:58 -07:00
Joaquín Cuenca Abela
96ca9ff6ff Another attempt to achieve python 3 compatibility. 2014-02-04 17:37:18 +01:00
Joaquín Cuenca Abela
97b23af7e5 Try to fix test_file_jpeg in Python3 2014-02-04 17:23:29 +01:00
Joaquín Cuenca Abela
a0af87e524 Make test_file_jpeg compatible with Python 3 2014-01-28 08:48:40 +01:00
Joaquín Cuenca Abela
bab068a337 Improve heuristic used when saving progressive and optimized JPEGs with high quality values. 2014-01-27 20:27:03 +01:00
Joaquín Cuenca Abela
c68044bf7f Fix IOError when saving progressive JPEGs.
when the jpeg encoder sees the flags optimize or progressive (or progression)
it will write the full image in one shot.

The bufsize needs to be big enough to hold the entire image. The current heuristic
is that the entire compressed image will fit in width * height bytes, but this
heuristic is only applied to save operations with the flag "optimize" and not to
save operations with the flag "progressive".

This patch fixes this oversight.

(Btw, it will probably be a good idea to have a loop that retries with a bigger
bufsize in case this guess is not big enough.)
2013-08-02 14:36:46 +02:00
wiredfool
37359369ce Code to ensure buffer space for exif write and jpeg_write_scanline calls, tests, corrected buffer length calculation 2013-05-14 22:29:31 -07:00
wiredfool
2a743c9527 JpegImagePlugin sets bufsize for optimized images 2013-03-22 22:27:12 -07:00
wiredfool
c6249a5b76 Remove irrelevant test 2013-03-14 15:45:44 -07:00
Mikhail Korobov
a71183dab5 better fix for #15 (with a test case now) 2013-02-26 17:12:11 +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