Commit Graph

1812 Commits

Author SHA1 Message Date
Alexander
b9f3fa4a28 increase coverage 2017-08-28 21:18:25 +03:00
Alexander
82c986dfab Merge branch 'master' into 16-bit-rgb-tiff 2017-08-28 19:42:46 +03:00
Alexander Karpinsky
6b4b1dc3c5 Merge pull request #2694 from uploadcare/packing-tests
Packing tests
2017-08-28 19:42:06 +03:00
Alexander
40fe1f721e unpacking tests for "I" and "F" modes 2017-08-28 19:22:59 +03:00
Alexander
aac0869ca7 Revert little-endian byte order for "I" and "F" rawmodes 2017-08-28 19:02:15 +03:00
Alexander
4d56db3a34 Fix wrong formula for subsampling=2 while JPEG saving 2017-08-27 20:03:36 +03:00
Alexander
7f7b53447a Add tests for all new modes 2017-08-26 17:36:06 +03:00
Alexander
a78e45c3dc Merge branch 'packing-tests' into 16-bit-rgb-tiff 2017-08-26 17:17:49 +03:00
Alexander
922407e7f3 fix py3, change test 2017-08-26 11:02:51 +03:00
Alexander
f43b9f396f Second part of pack tests 2017-08-26 10:49:28 +03:00
Alexander
8cb9cba1e0 Packing tests, first part. Fix RGBX packers 2017-08-24 00:58:39 +03:00
Alexander
a812f6c480 fix tests test_I16 2017-08-23 23:09:09 +03:00
Alexander
d33eab504d byte strings 2017-08-23 10:52:30 +03:00
Alexander
29aca0815a Third part of unpack tests 2017-08-23 10:27:13 +03:00
Alexander
5c2199c97b Second part of unpack tests 2017-08-23 01:55:55 +03:00
Alexander
f012fa15dd First part of unpack tests 2017-08-23 01:32:10 +03:00
wiredfool
f5a8ece187 Merge pull request #2254 from uploadcare/resample-roi
Region of interest (box) for resampling
2017-08-22 22:35:12 +01:00
Alexander
21d1c4cef5 Merge branch 'master' into 16-bit-rgb-tiff 2017-08-21 22:43:30 +03:00
Alexander
846f986bc8 Tests for 16bit tiff 2017-08-21 17:10:05 +03:00
Andrew Murray
ce999ff302 If n_frames is known, then use when determining is_animated 2017-08-18 20:20:27 +10:00
Alexander
b975f9db92 Merge branch 'master' into resample-roi
# Conflicts:
#	libImaging/Resample.c
2017-08-17 15:43:30 +03:00
Alexander
e7cdb3718c Merge branch 'master' into fast-filters 2017-08-17 02:50:18 +03:00
wiredfool
300dfcf4a4 Test/fix for issue #2044 2017-08-16 11:46:27 -07:00
wiredfool
a42f993bec Merge pull request #2675 from radarhere/im
Added test for ImImagePlugin tell()
2017-08-16 15:41:37 +01:00
wiredfool
c0f0268651 Merge pull request #2667 from vytisb/exif_zerodivision
Fix ZeroDivisionError when EXIF contains invalid DPI (0/0).
2017-08-16 15:39:20 +01:00
wiredfool
b4a373eae7 Merge pull request #2659 from radarhere/sgi_tests
Added tests for SgiImagePlugin
2017-08-16 15:37:35 +01:00
wiredfool
e2602452f4 Merge pull request #2661 from uploadcare/get-channel
New Image.getchannel method
2017-08-16 15:33:54 +01:00
wiredfool
1d416c58e5 Merge pull request #2674 from radarhere/fli
Use frame count from FLI header
2017-08-16 15:13:27 +01:00
wiredfool
e7aa155b72 Merge pull request #2654 from python-pillow/storage-cleanup
Storage cleanup
2017-08-16 12:00:32 +01:00
Andrew Murray
72f0c7b873 Updated tests 2017-08-16 20:57:10 +10:00
wiredfool
680a7ac43b Merge branch 'master' into fli 2017-08-16 11:46:55 +01:00
wiredfool
b56d533aea Merge pull request #2650 from hugovk/fix-fli-seek-load
Test animated FLI file
2017-08-16 11:44:35 +01:00
wiredfool
851d4ec538 Merge pull request #2645 from hugovk/mv-createfontdatachunk
Move createfontdatachunk.py so isn't installed globally
2017-08-16 11:38:11 +01:00
wiredfool
3967e00bcd Merge pull request #2641 from hugovk/fix-unexpected-align
Fix unexpected keyword argument 'align'
2017-08-16 11:37:12 +01:00
Alexander
e842919f37 oops 2 2017-08-15 07:53:31 +03:00
Alexander
b8e104e743 oops 2017-08-15 07:52:02 +03:00
Alexander
b31c74a9cc Tests for all bands and combinations 2017-08-15 07:45:03 +03:00
Alexander
847dd67a41 serious test for kernel filters 2017-08-12 23:22:59 +03:00
Alexander
e16ab0ad2e add tests, fix implementation 2017-08-12 14:10:39 +03:00
Andrew Murray
7088e1a201 Added tests 2017-08-12 19:30:09 +10:00
Andrew Murray
4744fc0584 Added test for ImImagePlugin tell() 2017-08-12 15:54:54 +10:00
Alexander
79eae6e3bf actually box can be empty, this is noop 2017-08-11 19:36:46 +03:00
Alexander Karpinsky
09a2e1641b Merge branch 'master' into resample-roi 2017-08-11 19:10:11 +03:00
Vytis Banaitis
7c8e0e4457 Fix ZeroDivisionError when EXIF contains invalid DPI (0/0). 2017-08-09 16:16:14 +03:00
Alexander
349e300d7b use getchannel where is possible 2017-08-09 02:36:07 +03:00
Andrew Murray
5d5a2a3762 Added test for 1 dimensional L mode SGI save 2017-08-07 21:57:59 +10:00
Andrew Murray
667fff7862 Added SGI test for an incorrect number of bands 2017-08-07 20:10:39 +10:00
Andrew Murray
e4927b8f2f Added SGI test for saving an image in an unsupported mode 2017-08-07 19:21:54 +10:00
Alexander
0649da02c6 fix tests on python 3 2017-08-06 14:12:55 +03:00
Alexander
6b50ba07fd add tests for Image.new modes 2017-08-06 14:12:55 +03:00
Hugo
382db4442c Test animated FLI 2017-08-04 14:41:28 +03:00
Hugo
47aa59a046 Add from https://samples.libav.org/fli-flc/
https://samples.libav.org/ says:

This is the Libav samples collection.
You can find samples of various common and uncommon
multimedia formats here. The size of the collection
currently is 54GB and growing.

You are free to download any samples you want, but
if you want to download more than just a few or want
to mirror the whole collection please send a mail to
webmaster(AT)libav(DOT)org *before* you start
and ask for permission.

We can also ship the samples collection to you for a
reasonable fee, inquire for details.

The best way to download samples is with rsync. If you decide
to fetch a large amount (more than 1GB), please limit the rate
to no more than 50 kBps (use the --bwlimit option of rsync).

Please be aware that this samples collection contains a lot
of files that are very obscure, broken in various ways or
are just simply out of use. Hence, it doesn't make sense
to download all of them, unless you are developing a player
applic
2017-08-04 12:39:19 +03:00
Andrew Murray
eaffb1414a Added test 2017-07-29 10:20:19 +10:00
Hugo
8400660083 Move so isn't installed globally 2017-07-27 14:12:28 +03:00
Hugo
90886a4e59 Merge pull request #2632 from wiredfool/issue_2628
Fix JPEG DPI when EXIF is invalid
2017-07-25 11:01:29 +03:00
Hugo
10c7e20045 Test for #2639 2017-07-23 23:56:02 +03:00
Oliver Tonnhofer
9e7de70bac Delete transparency info when convert'ing RGB/L to RGBA
info['transparency] was not removed when an RGB or L image
was converted to RGBA. This could result in unexpected behavior
when saving the resulting image.

Other image conversions already delete or update the transparency
info. There is a shortcut for RGB/L to RGBA which missed this.
2017-07-18 15:00:09 +02:00
wiredfool
908fffdd2c Test for https://github.com/python-pillow/Pillow/issues/2628#issuecomment-315962612 2017-07-18 01:06:54 -07:00
wiredfool
d2b3e60bbb test for issue #2614 2017-07-16 17:23:08 +10:00
Andrew Murray
844b812ebd Removed debugging code 2017-07-15 17:12:33 +10:00
Eric Soroos
20da797fce updates for centos/amazonlinux 2017-07-01 03:46:49 -07:00
wiredfool
b9b5d39f2b Merge pull request #2595 from wiredfool/issue_1911
Image.Image.alpha_composite Added
2017-07-01 11:43:58 +01:00
wiredfool
8feac899dd Merge pull request #2576 from wiredfool/pr_2284
Complex Text Support
2017-07-01 10:45:18 +01:00
nediamond
d1b66e9dfd Added threshold parameter to ImageDraw.floodfill (#2599)
* added thresh option and test

* fixed up, test works and passes

* Update test_imagedraw.py

* Update test_imagedraw.py

* Update ImageDraw.py

* removed pypy skip decorator from thresh test

* Update ImageDraw.py
2017-07-01 10:37:02 +01:00
wiredfool
2c6cf03de1 test features in get size 2017-06-30 22:57:57 +01:00
Fran Barba
29c622dd3d Fixed typo biger > bigger 2017-06-29 11:21:19 +02:00
wiredfool
14293ea4b1 Tests pass on osx 2017-06-29 01:50:29 -07:00
Fran Barba
a7d75c4b21 Applied Hugovk recommendations 2017-06-28 12:12:44 +02:00
Fran Barba
ebaa509d66 Adjust buffer size when icc_profile > MAXBLOCK (issue #148)
We were encountering some errors when saving specific JPEG images.
The error was shown in stderr as:
  IOError: encoder error -2 when writing image file

And on stdout it printed:
    Suspension not allowed here

The problem was the bufsize not contemplating the icc_profile block.
2017-06-28 12:11:33 +02:00
wiredfool
c7efd0bf6d re-organized the parameters, moved size specification to overlay tuple 2017-06-27 22:03:44 +01:00
wiredfool
1d33dfbced Added source point parameter for Image.Image.alpha_composite 2017-06-27 22:03:44 +01:00
wiredfool
69768c514b Added inplace alpha composite 2017-06-27 22:03:44 +01:00
wiredfool
e3f1e9293d fixing the png leak test memory calculations 2017-06-27 21:20:46 +01:00
wiredfool
db2359a30f y offset on trusty/x86 is 1.63 2017-06-21 14:00:15 -07:00
wiredfool
8d9f6029e1 remove non-tempfile usage from tests 2017-06-21 14:00:15 -07:00
wiredfool
183e0ec21d Added Noto font license [ci skip] 2017-06-21 14:00:15 -07:00
Eric Soroos
53e247cfc4 test tweak for ubuntu 16.04 2017-06-21 14:00:15 -07:00
wiredfool
39327332df test both layout engines, if available 2017-06-21 14:00:15 -07:00
wiredfool
b8c04de043 added layout engine switch 2017-06-21 14:00:15 -07:00
wiredfool
f371ca07f4 hoist tests out of try/except, use feature detection 2017-06-21 14:00:15 -07:00
Fahad Al-Saidi
e07a254ed9 update 2017-06-21 14:00:14 -07:00
Fahad Al-Saidi
fd7a675de6 adding KeyError exception
so the test not fail when there is no raqm lib.
2017-06-21 14:00:14 -07:00
Fahad Al-Saidi
4ed6962364 only catch ImportError same as test_imagefont.py 2017-06-21 14:00:14 -07:00
shamsa
312c87e279 fix testing 2017-06-21 14:00:14 -07:00
shamsa
a77850564a Fix gitsize function. 2017-06-21 14:00:14 -07:00
shamsa
fcd20da3cb Testing complex text layout. 2017-06-21 14:00:14 -07:00
wiredfool
5a671830d8 Merge pull request #2541 from uploadcare/fix-truncated-png-loading
Fix truncated png loading
2017-06-21 12:23:15 +01:00
wiredfool
8eb1dcb7c5 test for truncated png memory leak #2541 2017-06-21 03:31:32 -07:00
wiredfool
c70977aad7 added decompression bomb check to crop 2017-06-21 02:36:11 -07:00
wiredfool
1f19c023e1 Merge pull request #2406 from blochl/multiframe_tiff
Allow to save tiff stacks from separate images
2017-06-13 22:30:35 +01:00
wiredfool
8323ab1149 Merge pull request #2447 from hugovk/test-mic
Test MicImagePlugin for correctness
2017-06-13 22:20:44 +01:00
hugovk
2d02f4ea9b Adjust test for the gamma of 2.2 encoded into the file 2017-06-13 23:07:46 +03:00
wiredfool
d8f15a0706 Merge pull request #2558 from uploadcare/resize-truncate-coeffs-2
Use round instead of floor to exclude of zero coefficients
2017-06-13 21:03:27 +01:00
wiredfool
c3e041e9e6 Merge branch 'master' into rm-deprecated-fn 2017-06-13 13:32:38 +01:00
wiredfool
ae431bc9fb Merge pull request #2526 from radarhere/pdf
Added append_images to PDF saving
2017-06-13 13:25:50 +01:00
wiredfool
c16ba722f2 Merge pull request #2551 from jdufresne/keys
Remove unnecessary calls to dict.keys()
2017-06-13 13:12:48 +01:00
wiredfool
1cfb20a2a9 Merge pull request #2533 from hugovk/imagedraw
Add more ImageDraw.py tests and remove unused Draw.c code
2017-06-13 13:10:32 +01:00
wiredfool
38be701a9a Merge pull request #2554 from hugovk/test-imagemorph2
More unit tests for ImageMorph
2017-06-13 13:06:52 +01:00
wiredfool
4a8d260d76 Merge pull request #2552 from hugovk/test-mcidas
Test a McIDAS area file
2017-06-13 13:04:30 +01:00
Eric Soroos
3293d6a1c5 tests for features 2017-06-13 04:38:26 -07:00
Andrew Murray
b8e0daaf70 Replaced true assert with comment 2017-06-03 14:05:24 +10:00
Andrew Murray
e8cba27bb1 Changed assert checks to more specific versions 2017-06-03 14:04:54 +10:00
Andrew Murray
cf575ff93e Replaced false assert with fail 2017-06-03 14:04:18 +10:00
Andrew Murray
803cdf068f Removed unnecessary parameter 2017-06-03 13:56:23 +10:00
Hugo
ffcd945ae7 Test MRL save/load roundtrip 2017-05-30 18:02:20 +03:00
hugovk
4c86ef0b52 More morph tests 2017-05-30 18:02:20 +03:00
hugovk
04f28b691e Test negate and fix a TypeError: list indices must be integers, not str 2017-05-30 18:02:20 +03:00
hugovk
761081b1e3 Test mirroring 2017-05-30 18:02:20 +03:00
Andrew Murray
2a5447691a Replaced deprecated assert_ 2017-05-30 19:55:35 +10:00
Andrew Murray
4b1784c9ad Changed file opening to use with 2017-05-30 19:54:40 +10:00
Alexander
ad883961ac fix hamming filter 2017-05-29 14:29:12 +03:00
Jon Dufresne
d244fbb299 Remove unnecessary calls to dict.keys()
iter(dict) is equivalent to iter(dict.keys()), so simply act on the dict
instead of adding the extra call.

Inspired by Lennart Regebro's PyCon 2017 presentation "Prehistoric
Patterns in Python". Available at:

https://www.youtube.com/watch?v=V5-JH23Vk0I
2017-05-28 09:55:38 -07:00
hugovk
9626e49c0b Test a McIDAS area file 2017-05-28 16:11:16 +03:00
hugovk
c70eb8a128 flake8 2017-05-27 23:55:14 +03:00
hugovk
e4d6223c94 Remove deprecated code due for removal in Pillow 4.2 (per PR #2010) 2017-05-27 23:20:03 +03:00
hugovk
e002207c5b Remove function deprecated and warning since 3.0 (1 Oct 2015) 2017-05-27 21:55:42 +03:00
hugovk
d85dffd150 Remove functions deprecated and warning since 2.0 (15 Mar 2013) and raising exceptions since 3.0 (1 Oct 2015) 2017-05-27 21:52:43 +03:00
Hugo
08c72a1720 flake8 2017-05-16 10:33:38 +03:00
hugovk
206e316c0e Test limits of arc/ellipse's start and end 2017-05-15 22:58:51 +03:00
hugovk
f1631e0d05 Test drawing a rectangle bigger than the image 2017-05-15 21:44:28 +03:00
hugovk
5871b7a5ba Test drawing a wide "line" from one point to another just draws a single point 2017-05-15 21:32:54 +03:00
Hugo
ae9181f0a4 Test polygons in RGB and L modes 2017-05-15 18:24:12 +03:00
Hugo
e77c3b3eb2 Test ellipse in RGB and L modes 2017-05-15 18:23:00 +03:00
Hugo
de1f156fcd Add test file 2017-05-15 18:13:36 +03:00
Hugo
d4a350cd79 Test chord in RGB and L modes 2017-05-15 18:04:33 +03:00
Hugo
3db1944762 Test drawing polygons with sloped and flat lines 2017-05-15 17:09:29 +03:00
Joshua Blum
a6874f01ac Add test 2017-05-13 12:07:16 -04:00
wiredfool
f6f30b1c13 Merge pull request #2521 from adw1n/master
Fix for issue #2514 - error handling mistake in _webp.c
2017-05-13 14:24:51 +01:00
Hugo
2e492f8314 Merge pull request #2295 from radarhere/executable
Set executable flag on scripts with shebang line
2017-05-13 13:20:44 +03:00
Andrew Murray
80806d349f Added append_images to PDF saving 2017-05-13 14:26:52 +10:00
adw1n
6ce11c9e8c Added tests that call _webp.WebPEncode and _webp.WebPDecode with invalid number of arguments. 2017-05-12 17:11:58 +02:00
Andrew Murray
37b293f593 Flake8 fixes 2017-04-20 21:14:23 +10:00
Hugo
a4bfe1a1d5 Test file with DPI in EXIF but not metadata, and XResolution is an int rather than tuple 2017-04-11 13:53:01 +03:00
Hugo
b2933dc1c4 Image from Simon Conseil with permission: https://github.com/python-pillow/Pillow/issues/2481#issuecomment-293215833 2017-04-11 13:45:48 +03:00
wiredfool
9207d71f30 Merge pull request #2475 from wiredfool/pr_2032
Added non-exclusive fd for test for #2330
2017-04-04 09:14:19 +01:00
wiredfool
f95c158933 added non-exclusive fd for test 2017-04-04 00:27:20 -07:00
wiredfool
0834e9491e Merge pull request #2330 from wiredfool/pr_2032
Close files after loading when possible.
2017-04-03 23:32:06 +01:00
wiredfool
bfa80cd3b3 Merge pull request #2296 from wiredfool/issue_2268
Fix Access to be reloadable -- Issue #2268
2017-04-03 23:30:25 +01:00
Hugo
53df62647a DPI is a tuple (#2472)
* DPI is a tuple

* Some EXIF only contains an X resolution for DPI

* Refactor

* Test with no DPI in EXIF

* Handle EXIF with no DPI

* Created with: exiftool "-*resolution*"= photoshop-200dpi.jpg

* Test when not in EXIF, DPI==72,72

* Use X resolution for Y, default to 72,72 dpi

* Created with: exiftool -exif:ResolutionUnit=cm photoshop-200dpi.jpg

* Test for EXIF with dpcm instead of dpi

* Convert dpcm to dpi, and default to inches if unit unknown
2017-04-03 23:28:33 +01:00
wiredfool
fe0a33173b Give up on appveyor for now, disable test 2017-04-03 11:47:20 -07:00
wiredfool
1c7e8a18d5 fix for appveyor environment? 2017-04-03 11:23:21 -07:00
wiredfool
06b61f4e5b close the mmap when closing the image #2194 2017-04-03 08:06:59 -07:00
wiredfool
db338ca19a open file check for windows, on jpeg where we don't mmap the file 2017-04-03 08:06:59 -07:00
wiredfool
86c1704646 add _close_exclusive_fp_after_load flag 2017-04-03 08:06:58 -07:00
Andrew Murray
8cd70e74cc Set executable flag on scripts with shebang line 2017-03-31 19:43:19 +11:00
Eric Soroos
6c1f923368 fixed test on python27 OMM 2017-03-22 21:20:37 +00:00
wiredfool
878881b1b9 Fix Access to be reloaded if the python interpreter is restarted when embedded. Fixes #2268. 2017-03-22 21:20:37 +00:00
wiredfool
900c5e5bf2 added unix test for fd leak 2017-03-14 23:17:22 +00:00
wiredfool
e4e0e0d2bf Adjusted test to match expected behavior 2017-03-14 23:17:22 +00:00
Marcus Brinkmann
e8122600f6 Test for: Close file handle in TiffImagePlugin when image is closed. 2017-03-14 23:17:22 +00:00