Commit Graph

3458 Commits

Author SHA1 Message Date
Andrew Murray
db3b5108dc Changed MP Type to match #1631 image 2021-01-01 13:00:01 +11:00
Andrew Murray
6175389186 Only read different sizes for "Large Thumbnail" frames 2021-01-01 12:45:02 +11:00
Andrew Murray
62693b7c54 Moved QApplication into one test 2021-01-01 11:33:20 +11:00
Hugo van Kemenade
4093897673
Merge pull request #5126 from radarhere/apng_disposal
Use disposal settings from previous frame in APNG
2020-12-31 16:06:33 +02:00
Andrew Murray
77b16efba3 Corrected argument 2020-12-31 16:25:46 +11:00
Andrew Murray
3c482b1b0b Changed list of single item dictionaries to dictionary 2020-12-30 23:10:29 +11:00
Andrew Murray
8c8b110035 Check string value 2020-12-30 22:40:39 +11:00
Andrew Murray
06b7b97a7a Use isinstance to check type 2020-12-30 22:39:49 +11:00
Andrew Murray
17c48db318 Use context manager 2020-12-30 22:35:54 +11:00
Andrew Murray
800a265f1c Test ICNS on all operating systems 2020-12-30 13:09:30 +11:00
Andrew Murray
86ad435ee4
Merge branch 'master' into master 2020-12-30 13:05:35 +11:00
Hugo van Kemenade
85d61ca7d5
Merge pull request #5139 from radarhere/repr_png
Added exception explaining that _repr_png_ saves to PNG
2020-12-29 12:43:22 +02:00
Hugo van Kemenade
cd446e6088
Merge pull request #5125 from radarhere/disposal_method
Use previous disposal method in GIF load_end
2020-12-29 12:26:14 +02:00
Hugo van Kemenade
25500e83bc
Merge pull request #5089 from radarhere/putpalette_rgba
Allow putpalette to accept 1024 integers to include alpha values
2020-12-29 12:17:50 +02:00
UrielMaD
3e9403af56 XMP feature added 2020-12-27 22:32:42 -06:00
UrielMaD
096854d1c8 XMP feature added 2020-12-27 22:29:51 -06:00
UrielMaD
7968279c13 XMP feature added 2020-12-27 22:24:38 -06:00
UrielMaD
cc8070aec5 XMP feature added 2020-12-27 21:39:36 -06:00
UrielMaD
b1b7d2ff18 XMP feature added 2020-12-27 21:37:15 -06:00
UrielMaD
b802588223 XMP feature added 2020-12-27 20:49:28 -06:00
UrielMaD
08935aeaca XMP feature added 2020-12-27 20:09:10 -06:00
UrielMaD
ee5d05ae21 XMP feature added 2020-12-27 20:01:56 -06:00
UrielMaD
4ff5546203 XMP feature added 2020-12-27 20:00:04 -06:00
UrielMaD
c84f1058ea XMP feature added 2020-12-27 19:54:06 -06:00
UrielMaD
2474cc2db6 XMP feature added 2020-12-27 19:52:46 -06:00
Eric Soroos
d96945b7c8 Fix Out of bounds read when saving GIF of xsize=1 2020-12-27 16:01:26 +01:00
Andrew Murray
fdce845364 Added exception explaining that _repr_png_ saves to PNG 2020-12-27 15:36:16 +11:00
Andrew Murray
e37a8a263d
Merge pull request #4568 from ziplantil/ico-append-images
Add append_images support for ICO
2020-12-24 11:10:33 +11:00
Andrew Murray
46f7b4a439
Updated test name and text 2020-12-24 10:50:43 +11:00
Andrew Murray
5e4e0fa6ee Use disposal settings from previous frame 2020-12-24 09:55:22 +11:00
Andrew Murray
9940c84b08 Use previous disposal method in load_end 2020-12-23 13:22:53 +11:00
Andrew Murray
8794610c76 Block TIFFTAG_SUBIFD 2020-12-22 11:38:02 +11:00
Andrew Murray
83d82ae150
Merge pull request #5098 from hugovk/deprecate-freetype
Deprecate FreeType 2.7
2020-12-20 13:35:41 +11:00
Andrew Murray
c52c3ae3e2
Merge pull request #5102 from hugovk/add-path-tests
Add tests for ImagePath.Path
2020-12-20 07:43:56 +11:00
Andrew Murray
b0af0d4076 Travis CI is no longer used 2020-12-19 21:57:32 +02:00
Hugo van Kemenade
9e21ef7338 Remove old Travis CI config 2020-12-19 21:57:32 +02:00
Hugo van Kemenade
ceaed2e058 Add tests for ImagePath.Path 2020-12-18 22:54:48 +02:00
Hugo van Kemenade
2b319f2ce4 Simplify: remove class 2020-12-18 22:54:40 +02:00
Hugo van Kemenade
27bf17009c Deprecate FreeType 2.7, to be removed in Pillow 9 (2022-01-02) 2020-12-17 10:28:06 +02:00
nulano
db35e6404e remove FreeType<2.7 metrics in test_imagefont 2020-12-12 15:29:41 +01:00
nulano
a3ab868b0f xfail tests failing on ppc64le on GHA
(cherry picked from commit 9c7fb5bd14c3064fede96131a0f7f67abf26a4e7)
2020-12-12 15:26:42 +01:00
nulano
989c9b303a xfail failing libtiff tests on big-endian
(cherry picked from commit 25ce233edf732edb5660f877365379377a64f136)
2020-12-12 15:26:42 +01:00
Andrew Murray
a666c91e10 Allow putpalette to accept 1024 integers to include alpha values 2020-12-12 14:12:30 +11:00
nulano
86993df834 remove duplicate values 2020-11-25 07:38:13 +00:00
nulano
74048f9b4f remove FT 2.3 from tests 2020-11-25 07:27:11 +00:00
Hugo van Kemenade
85e991e5b6 Don't include test-skipping 'except' in coverage 2020-11-04 16:05:51 +02:00
Andrew Murray
a357ff12ad Simplified test 2020-11-04 22:39:25 +11:00
Andrew Murray
d1650cb2b3 Document FreeMono license [ci skip] 2020-10-23 21:08:06 +11:00
nulano
2586b7ddef add tests for subsampled jpeg2000 image decoding 2020-10-20 07:16:28 +01:00
Andrew Murray
f886bc973b Moved string_dimension image to pillow-depends 2020-10-19 21:32:56 +11:00
gofr
9980981c2e De-zigzag JPEG's DQT when loading; deprecate convert_dict_qtables
Re-order the JPEG quantization tables to normal order when
loading. This wastes a few CPU cycles if you don't need them.
But it has the advantage of hiding the zigzag order JPEG
implementation detail of these tables completely from Pillow
users.

This difference has led to cases where:
* arrays in zigzag order were taken from a dict and passed
  directly as a qtables parameter, causing them to be "zigzagged"
  again by libjpeg.
* dicts with lists in normal order being passed to
  JpegImagePlugin.convert_dict_qtables, causing them to be
  unnecessarily "de-zigzagged".
2020-10-17 20:20:59 +02:00
Hugo van Kemenade
b074d87179
Merge pull request #4760 from qiankanglai/dds-rgba8888
Support raw rgba8888 for dds
2020-10-15 08:10:01 +03:00
Hugo van Kemenade
1cb3e2f742
Merge pull request #4918 from gofr/4825-jpeg-16-bit-qt 2020-10-14 17:58:12 +03:00
Andrew Murray
1a3367400c Added reading of IFD tag type 2020-10-14 23:37:54 +11:00
mergify[bot]
50787ad2c4
Merge pull request #4971 from radarhere/freetype
Updated freetype to 2.10.3
2020-10-13 06:10:01 +00:00
Hugo van Kemenade
9a93f6ee45
Merge pull request #4959 from nulano/anchor-part3 2020-10-12 19:27:08 +03:00
Hugo van Kemenade
c7b0fe1bca
Merge pull request #4963 from nulano/implicit-function 2020-10-12 19:23:40 +03:00
nulano
c277ff4304 remove old PyPy compatibility code 2020-10-12 16:14:51 +01:00
nulano
b49ebad5f5 Merge remote-tracking branch 'upstream/master' into anchor-part3 2020-10-12 16:14:00 +01:00
nulano
cb3f6c09e7 add spaces between pytest.mark.parametrize parameters 2020-10-12 16:08:16 +01:00
Hugo van Kemenade
c1a9f889f3
Merge pull request #4964 from nulano/pypy 2020-10-12 17:59:55 +03:00
nulano
90e8255ba4 Merge remote-tracking branch 'upstream/master' into anchor-part3
# Conflicts:
#	Tests/test_imagefontctl.py
2020-10-12 15:50:45 +01:00
Hugo van Kemenade
309cb9e5c4
Merge pull request #4927 from radarhere/tuple 2020-10-12 14:40:22 +03:00
Hugo van Kemenade
43c3f4de80
Merge pull request #4955 from nulano/ft-color3 2020-10-12 13:52:01 +03:00
Andrew Murray
518b783c64 Removed OSError in favour of DecompressionBombError 2020-10-12 19:32:48 +11:00
nulano
40c9a5a2a0 compatibility for LCMS<2.7, vix LCMS version string 2020-10-12 02:58:24 +01:00
nulano
c06bb8044d remove PyPy3-7.1.x compatibility code 2020-10-12 02:08:50 +01:00
nulano
df2ea75683 remove redundant test file 2020-10-11 22:39:07 +01:00
nulano
b5fe0e7986 add helper.skip_unless_feature_version 2020-10-11 22:26:11 +01:00
nulano
d84185579e move bitmap font tests to test_imagefont 2020-10-11 21:45:10 +01:00
nulano
b85fabca70
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-10-11 22:25:16 +02:00
Hugo van Kemenade
15c339470d
Merge pull request #4523 from xtsm/ellipse
Implemented another ellipse drawing algorithm
2020-10-11 18:04:34 +03:00
Andrew Murray
166cc00843 Updated freetype to 2.10.3 2020-10-11 21:35:21 +11:00
gofr
938e251088 Add new JPEG test image 2020-10-10 20:08:39 +02:00
gofr
d54dc4062f fixup! Add tests for loading/saving of 16-bit quantization tables 2020-10-10 20:01:28 +02:00
gofr
2f0544b542 Add tests for loading/saving of 16-bit quantization tables 2020-10-10 18:53:49 +02:00
nulano
1551e120ae add textlength and textbbox to ImageDraw 2020-10-09 01:02:51 +01:00
nulano
395aa946a9 add getbbox and getlength, with tests
Squashed commits:

[ec9ec31b] add tests for invalid anchor
(cherry picked from commit 9e50a6a47f79876ee56942152047f03fff03c49b)

[386a9170] fix lint and docs
(cherry picked from commit 2d0d5282fcfc3ee332a41e60b865ee766445cc3d)

[29f5d4c9] restore and document previous getsize behaviour
see discussion in issue 4789
(cherry picked from commit 9fbc94571ce0ed42fdd11e99f343a1613c9dc6d3)

[0ffd51a0] add getbbox and getlength, with tests
(cherry picked from commit c5f63737476a998c81e589e5819d21ca69bb7b46)
2020-10-09 00:56:58 +01:00
nulano
786eaf11e2 downgrade NotoColorEmoji to minimize size 2020-10-07 13:31:05 +01:00
nulano
24f3d85a3e add test for {1bpp, 2bpp, 4bpp, 8bpp} bitmap fonts 2020-10-07 11:57:15 +01:00
nulano
28d313305a fix tests 2020-10-07 05:29:18 +01:00
nulano
55db572467 add tests for opaque COLR and CBDT fonts 2020-10-07 05:29:18 +01:00
nulano
9151da162c add support for CBDT and embedded bitmaps in truetype fonts 2020-10-07 05:29:17 +01:00
Hugo van Kemenade
a7f384a813
Merge pull request #4292 from radarhere/private_png_chunks
Added reading and writing of private PNG chunks
2020-10-05 23:49:09 +03:00
Hugo van Kemenade
b29cab08d3
Merge pull request #4930 from nulano/anchor-part2 2020-10-05 20:19:33 +03:00
Andrew Murray
7a1f0f6a8f Fixed bug in Exif __delitem__ 2020-10-05 09:45:05 +11:00
nulano
8cdac68706 Revert "Skip due to segmentation fault"
This reverts commit 7711a4c94d.
2020-10-04 22:48:23 +01:00
Hugo van Kemenade
7711a4c94d Skip due to segmentation fault 2020-10-04 00:33:31 +03:00
nulano
7d284b72ab
f-strings!
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-09-22 22:19:04 +01:00
Andrew Murray
26bf1c3524 Moved CVE images to pillow-depends 2020-09-23 00:14:40 +10:00
nulano
0838d8ea62 add tests for multiline text with anchor 2020-09-22 14:58:21 +02:00
nulano
3fc1be06e6 add and fix tests for text anchors 2020-09-22 11:31:43 +02:00
Andrew Murray
b304a13bca Updated test 2020-09-22 13:06:52 +10:00
Andrew Murray
27c0747518 Allow tuples with one item to give single color value in getink 2020-09-20 14:23:05 +10:00
Hugo van Kemenade
93d011efb5
Merge pull request #4910 from nulano/anchor-part1 2020-09-19 13:41:15 +03:00
Andrew Murray
c196af6ddb Fixed loading profile with non-ASCII path on Windows 2020-09-13 13:53:58 +10:00
nulano
d1edf86953 tests cleanup 2020-09-09 05:35:55 +02:00
nulano
ee1cc6ad7c remove use of FT_Set_Transform 2020-09-09 02:14:49 +02:00
nulano
54e067779b fix and add tests
(cherry picked from commit 0b711f10d0490863976699c051f2027b6799d501) (+1 squashed commits)

Squashed commits:

[9d4e6c17] fix tests
2020-09-09 02:12:21 +02:00
Andrew Murray
c83ffc6aea Fixed effect_spread bug for zero distance 2020-09-08 18:51:58 +10:00
Andrew Murray
fac2d2781e
Merge pull request #4837 from nulano/formats
Add formats parameter to open
2020-09-05 20:49:59 +10:00
Andrew Murray
9c22425881 Lint fix 2020-09-05 13:32:59 +10:00
Hugo van Kemenade
3dba4ee10a
Merge pull request #4846 from comhar/features/compute_polygon_coordinates 2020-09-04 23:28:43 +03:00
nulano
a340dc5fd3 Merge remote-tracking branch 'upstream/master' into formats 2020-09-04 21:07:34 +02:00
Hugo van Kemenade
799fa9764f
Merge pull request #4882 from nulano/putpixel 2020-09-03 19:22:30 +03:00
Hugo van Kemenade
ddc4c64664
Merge branch 'master' into rm-3.5 2020-09-02 20:36:30 +03:00
Hugo van Kemenade
9f1f63a46b
Merge pull request #4862 from radarhere/subifds 2020-09-02 16:58:55 +03:00
Andrew Murray
186a4723c8 Added test for empty GPS IFD 2020-09-02 21:14:36 +10:00
Hugo van Kemenade
e0eec1eb56 Merge branch 'master' into rm-3.5 2020-09-01 20:16:46 +03:00
Andrew Murray
bb013270af Removed trailing comma 2020-08-31 18:50:15 +10:00
Andrew Murray
298b7d0333 Update pre-commit 2020-08-31 18:50:15 +10:00
Andrew Murray
0a46cbfea9 Reverted NaN change, so that NaN != NaN 2020-08-28 20:55:47 +10:00
luphord
4bb35c57dd clarify comment
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2020-08-28 20:47:17 +10:00
luphord
ae5e0218e9 remove whitespace 2020-08-28 20:47:17 +10:00
luphord
1fd9ccfe3c test Exif self-equality 2020-08-28 20:47:16 +10:00
luphord
9db5266fa7 test IFDRational equality 2020-08-28 20:47:16 +10:00
Andrew Murray
0af193afc0 Added test 2020-08-24 21:32:55 +10:00
Hugo van Kemenade
27d34d2f13
Merge pull request #4823 from radarhere/close
Do not try to close file pointer if file pointer is empty
2020-08-23 14:26:11 +03:00
Tommy C
b142560488 Rename b_circle and bounding_circle + accept ((x0, y0), r)
Summary of changes

- Rename `b_circle` and `bounding_circle`
-`bounding_circle` now accepts both formats below:
    - (x0, y0, r)
    - ((x0, y0), r)
2020-08-22 20:19:23 +01:00
nulano
4b2a0173d3 group test cases
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-08-21 14:11:47 +02:00
nulano
76a51270fa split up test 2020-08-20 23:23:15 +02:00
Tommy C
df9329f9f0 Replace bbox with b_circle, kwargs with args + minor tweaks
Summary of changes:
 - `ImageDraw.regular_polygon` now accepts a bounding circle which
inscribes the polygon. A bounding circle is defined by a center point
(x0, y0) and a radius. A bounding box is no longer accepted.
 - All keyword args have been replaced with positional args.

Misc
- Test image file renaming, minor variable name changes
2020-08-20 20:46:11 +01:00
nulano
4bb78d53a3 give proper error message for invalid putpixel color type 2020-08-20 00:01:03 +02:00
Tommy C
ac7d41545d Update regular_polygon args + arg checks
Summary of changes

- Allow positional args in `regular_polygon` method
- Allow multiple bounding box formats
    - (e.g. bbox = [(x0, y0), (x1, y1)] or [x0, y0, x1, y1])
- Check if bounding box is square
- Update var names
    - b_box => bbox
    - nb_sides => n_sides
2020-08-16 21:07:16 +01:00
Tommy C
0ed01dd964 Add ImageDraw.regular_polygon 2020-08-16 13:29:13 +01:00
Andrew Murray
14af7bb5ac Do not try to close fp if fp is empty 2020-08-15 13:07:14 +10:00
Hugo van Kemenade
ef986e376f
Merge branch 'master' into master 2020-08-13 23:58:42 +03:00
Andrew Murray
e96109b93c Added writing of subIFDs 2020-08-13 22:25:24 +10:00
Hugo van Kemenade
1fe4070af6 Drop support for EOL Python 3.5 2020-08-11 22:29:44 +03:00
Hugo van Kemenade
fdc09206d0
Merge pull request #4828 from radarhere/exif_text 2020-08-11 21:52:12 +03:00
navneeth
2d3a841e4b testing with approx tuple to fix ubuntu test failures 2020-08-12 00:08:29 +09:00
navneeth
d0de431fe4 testing with approx tuple to fix ubuntu test failures 2020-08-12 00:06:16 +09:00
navneeth
01aeaa4cad added explicit test for autocontrast implementation - pixel value check 2020-08-11 23:47:48 +09:00
navneeth
4841bbe2a5 added explicit test for autocontrast implementation - pixel value check 2020-08-11 23:36:39 +09:00
Hugo van Kemenade
cb26b4d40f
Merge branch 'master' into master 2020-08-09 13:57:46 +03:00
Hugo van Kemenade
dd87dd50c0 Update to isort 5 with Black profile support 2020-08-08 22:39:29 +03:00
Navneeth Subramanian
faf913d0f8
Update Tests/test_imageops.py
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-08-08 19:32:52 +09:00
navneeth
fa493809a6 ENH: Autocontrast - Code review feedback 2020-08-07 14:31:17 +09:00
navneeth
8fad541531 ENH: Autocontrast method enhancement - adding the option to specify mask for contrast computation 2020-08-06 09:00:13 +09:00
nulano
2b061b68db add formats parameter to Image.open to restrict list of formats attempting to read an image file 2020-08-03 00:24:02 +02:00
Andrew Murray
5da1a8adcf Read EXIF data tEXt chunk into info as bytes instead of string 2020-07-31 17:42:48 +10:00
Hugo van Kemenade
10615a7da7 Upgrade Python syntax for 3.6+
Co-authored-by: nulano <nulano@nulano.eu>
2020-07-30 10:09:18 +03:00
Hugo van Kemenade
48c7d84bf7
Merge pull request #4814 from radarhere/sysconfig 2020-07-29 09:50:41 +03:00
Andrew Murray
fda22ed82e Removed unused variables 2020-07-29 07:54:33 +10:00
Andrew Murray
a10634e13f Do not explicitly import distutils 2020-07-26 14:59:30 +10:00
Andrew Murray
42bb401e88 Replaced distutils sysconfig 2020-07-25 20:03:27 +10:00
Andrew Murray
11de331886
Merge pull request #4798 from hugovk/rm-deprecated-notimplemented
Remove long-deprecated Image.py functions
2020-07-24 20:48:20 +10:00
Andrew Murray
b243a6113e
Merge pull request #4797 from hugovk/rm-distutils.version
Replace distutils.version with packaging.version.parse
2020-07-19 08:12:31 +10:00
Hugo van Kemenade
0b7077a385
Merge pull request #4788 from samamorgan/master 2020-07-17 11:07:56 +03:00
Hugo van Kemenade
40aefc6ba5 Remove im.offset, deprecated in 2001; and fromstring and tostring, deprecated in 2013 2020-07-17 10:55:20 +03:00
Sam Morgan
74e02e6c4e Add test for PSD mimetype 2020-07-16 08:26:42 -07:00
Hugo van Kemenade
304d3c1080 Replace distutils.version with packaging.version.parse, distutils will eventually be removed from stdlib 2020-07-16 14:57:39 +03:00
Jakub Kulík
ee856bdc25 Fix expected failures on big endian systems without CI 2020-07-16 11:04:16 +02:00
Hugo van Kemenade
559510b378 Remove attributes deprecated since 3.2.0 2020-07-09 23:53:22 +10:00
Kanglai Qian
b5c59878da support raw rgba8888 for dds 2020-07-07 00:22:57 +08:00
Hugo van Kemenade
ec6f2d41f8
Merge pull request #4749 from millionhz/autocontrast 2020-07-05 12:10:23 +03:00
Andrew Murray
9432bba6d1 Moved tests 2020-07-02 20:28:00 +10:00
Andrew Murray
4b5eab4c17 Simplified code 2020-07-02 19:14:28 +10:00
Hamza
16e804b892 linting fixed 2020-07-01 04:37:17 +05:00
Hamza
cbf4f328c7 fixed tests 2020-07-01 04:20:19 +05:00
Hamza
b768cc09d7 added test 2020-07-01 04:01:06 +05:00
Stanislau Tsitsianok
88651c334f
Try to fix CI 2020-06-29 23:58:58 +03:00
Stanislau Tsitsianok
7dedb1402f
Merge remote-tracking branch 'upstream/master' into ellipse 2020-06-29 23:31:25 +03:00
Stanislau Tsitsianok
5830a641cc
Added more tests 2020-06-29 23:31:04 +03:00
Stanislau Tsitsianok
9a9d3a050a
Fixed tests 2020-06-29 22:49:11 +03:00
Hugo van Kemenade
74a4c88a12
Merge pull request #4741 from radarhere/icns 2020-06-29 20:21:51 +03:00
Hugo van Kemenade
645f7f2346
Merge pull request #4742 from radarhere/apng_dispose
Fixed loading non-RGBA mode APNGs with dispose background
2020-06-29 17:15:34 +03:00
Andrew Murray
4cf7c562e4
Merge pull request #4726 from hugovk/fix-png-disposal-comparison-bug
APNG: Fix setting disposal
2020-06-30 00:01:15 +10:00
Andrew Murray
cd01a5ab9f Added disposal test 2020-06-29 22:02:01 +10:00
Andrew Murray
cdf4936c07 Fixed loading non-RGBA mode images with dispose background 2020-06-29 21:20:57 +10:00
Andrew Murray
1e8d418f42 Fixed ICNS file pointer saving 2020-06-28 17:24:27 +10:00
Hugo van Kemenade
b4e7202dcb
Merge pull request #4698 from nulano/skips 2020-06-27 14:19:49 +03:00
Hugo van Kemenade
d641bdc504
Fix isort 2020-06-27 14:05:34 +03:00
Hugo van Kemenade
f6cb5efa15
Merge pull request #4714 from radarhere/show
Deprecated _showxv
2020-06-25 23:15:51 +03:00
Hugo van Kemenade
7dd8837967
Merge pull request #4647 from radarhere/blocklist
Allow libtiff to write COLORMAP tag
2020-06-25 23:04:29 +03:00
Andrew Murray
ee06255ff0 Deprecated _showxv 2020-06-23 22:20:58 +10:00
Hugo van Kemenade
71fadd5c67
Merge pull request #4722 from radarhere/line 2020-06-23 14:53:56 +03:00
Andrew Murray
9979efff12
Merge pull request #4646 from nulano/show-command
Deprecate Image.show(command="...")
2020-06-23 19:47:57 +10:00
Andrew Murray
b042483baa Replaced assert_image_similar with assert_image_similar_tofile 2020-06-23 19:17:41 +10:00
Andrew Murray
c1fe0b4e0c Use hypot function 2020-06-23 19:17:00 +10:00
Kirill Kuzminykh
6d2fe429c2 Reformat code of `test_file_jpeg.py. 2020-06-22 12:20:57 +03:00
Andrew Murray
95ace8a39c
Merge branch 'master' into fix_jpeg_magic_number 2020-06-22 18:42:58 +10:00
Hugo van Kemenade
1bc67c9f0f
Merge pull request #4700 from nulano/features-version 2020-06-21 21:36:46 +03:00
nulano
12ddff729b
Merge branch 'master' into skips 2020-06-21 18:05:27 +01:00
Hugo van Kemenade
7b759e160a
Merge pull request #4615 from nulano/clipboard-png 2020-06-21 18:56:04 +03:00
Hugo van Kemenade
390b34c231
Merge pull request #4664 from nulano/ft-getsize-mode 2020-06-21 18:53:03 +03:00
nulano
d5a6b2584e add tests for version numbers 2020-06-21 18:59:01 +10:00
nulano
a324f4a466 add version to features info block 2020-06-21 18:58:39 +10:00
Andrew Murray
8383e840e4
Merge pull request #4626 from radarhere/stripbytecounts
Change STRIPBYTECOUNTS to LONG if necessary when saving
2020-06-21 09:02:56 +10:00
Hugo van Kemenade
bcb8cbbf22
Merge pull request #4639 from radarhere/jfif
Write JFIF header when saving JPEG
2020-06-20 15:54:11 +03:00
Hugo van Kemenade
2d9dcc7657
Merge pull request #4627 from radarhere/tiff_jpeg
Replaced tiff_jpeg with jpeg compression when saving TIFF images
2020-06-20 15:49:09 +03:00
Andrew Murray
d728cd5875 Allow libtiff to write COLORMAP tag 2020-06-20 22:38:38 +10:00
Hugo van Kemenade
7d9ac36e42
Merge pull request #4605 from radarhere/byte_tags
Writing TIFF tags: improved BYTE, added UNDEFINED
2020-06-20 15:33:18 +03:00
Hugo van Kemenade
b9a087d482
Merge pull request #4566 from radarhere/text
Consider transparency when pasting text on an RGBA image
2020-06-20 15:02:59 +03:00
Hugo van Kemenade
713dd17c8f
Merge pull request #4547 from radarhere/webp
Added method argument to single frame WebP saving
2020-06-20 14:04:01 +03:00
Andrew Murray
65742cfc95 Renamed test 2020-06-20 09:57:51 +10:00
Andrew Murray
abbc890b20 Replaced OSError with more specific UnidentifiedImageError 2020-06-20 09:51:48 +10:00
Andrew Murray
3e9068a345 Decreased length of test image data 2020-06-20 09:48:55 +10:00
Kirill Kuzminykh
f99e0b824b Replaced primitive "magic number" inside of JpegImagePlugin._accept() function by more correct version. 2020-06-18 16:18:18 +03:00
Andrew Murray
6ad98ba3c0 Do not ignore viewer if order is zero when registering 2020-06-18 21:40:38 +10:00
Stanislau Tsitsianok
27109c9011
Merge remote-tracking branch 'upstream/master' into ellipse 2020-06-16 20:20:44 +03:00
Hugo
e2e8db4fe8 Fix isort 2020-06-15 11:30:08 +01:00
nulano
dc41a4ec21 use skip_unless_feature in more tests 2020-06-14 20:21:30 +02:00
nulano
fc92f56382 replace skip_known_bad_test with xfail 2020-06-14 20:21:26 +02:00
nulano
12cd02bd2d use xfail for failing tests 2020-06-14 19:38:21 +02:00
Andrew Murray
7d1f5ba91b Removed test skips for MinGW 2020-06-14 23:08:21 +10:00
Andrew Murray
05932c4cbc Updated harfbuzz to 2.6.7 2020-06-14 22:23:19 +10:00
Hugo van Kemenade
3bbcd7b3de
Merge pull request #4642 from nulano/gha-msys 2020-06-13 13:26:00 +03:00
Andrew Murray
2d284aea12 Allow writing of UNDEFINED tags 2020-06-10 16:09:22 +10:00
Andrew Murray
859b27572b Removed forcing of BYTE to ASCII 2020-06-10 16:09:22 +10:00
Andrew Murray
7ecb5aaf7e BYTE tags of variable length are only single strings 2020-06-10 16:09:22 +10:00
Hugo van Kemenade
794e9f0f0e
Merge pull request #4637 from radarhere/v2
Use ImageFileDirectory_v2 in Image.Exif
2020-06-10 06:55:15 +03:00
Andrew Murray
ebd6901c95
Merge pull request #4673 from hugovk/yesqa
Remove redundant noqa
2020-06-08 21:02:15 +10:00
Hugo van Kemenade
b6d6f77262
Merge pull request #4675 from radarhere/polygon
Fixed drawing a 1px high polygon
2020-06-08 08:57:02 +03:00
Andrew Murray
0cc2e696cb Corrected reading EXIF metadata without prefix 2020-06-07 20:01:04 +10:00
Andrew Murray
eeb9e719e3 Fixed drawing a 1px high polygon 2020-06-07 12:07:13 +10:00
Hugo
c8e3757e72 Run yesqa to remove redundant noqa 2020-06-06 14:54:58 +03:00
Andrew Murray
ec9015bea4
Renamed variable
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-06-06 19:42:24 +10:00
Andrew Murray
e228cfcec7 Lint fixes 2020-06-06 12:08:37 +10:00
Hugo van Kemenade
52c66bbcfb
Merge pull request #4580 from radarhere/curve
Fixed drawing a jointed line with a sequence of numeric values
2020-06-04 12:03:25 +03:00
Andrew Murray
a5ef2b4499 Parametrized test 2020-06-04 07:56:14 +10:00
Hugo van Kemenade
4363507d16
Merge pull request #4608 from radarhere/numpy 2020-06-03 18:43:47 +03:00
Andrew Murray
ccac9e1a3a Changed to ImageFileDirectory_v2 2020-06-03 22:11:51 +10:00
nulano
2dd9324df2 add mono color text test 2020-06-01 22:18:38 +02:00
Hugo van Kemenade
02d55b79c1
Merge pull request #4560 from radarhere/xmp 2020-06-01 10:49:00 +03:00
Andrew Murray
696aa7972d Parametrized test 2020-05-26 07:15:20 +10:00
nulano
d54fee9863 move import 2020-05-25 22:21:51 +02:00
nulano
66954ad176 deprecate Image.show(command="...") 2020-05-25 18:57:02 +02:00
nulano
21325b8ce3 Merge remote-tracking branch 'upstream/master' into gha-msys
# Conflicts:
#	.appveyor.yml
#	.github/workflows/test-windows.yml
2020-05-25 17:37:26 +02:00
Hugo van Kemenade
f4fb9c5403
Merge pull request #4625 from radarhere/thumbnail 2020-05-25 17:08:25 +03:00
nulano
9640b48040 Merge branch 'master' of github.com:python-pillow/Pillow into winbuild-rewrite
# Conflicts:
#	.github/workflows/test-windows.yml
#	winbuild/config.py
#       winbuild/build_prepare.py
2020-05-25 14:32:21 +02:00
Andrew Murray
660894cd36 Write JFIF header when saving JPEG 2020-05-24 23:58:30 +10:00
nulano
d2f90d6cac fix freetype and raqm on MSYS 2020-05-23 23:16:06 +02:00
Andrew Murray
ac11fa7d1a
Merge pull request #4620 from ElinksFr/fix-gbr-image-loading
Fix repeatedly loading .gbr
2020-05-17 11:34:58 +10:00
Andrew Murray
45c4ba7a5f Simplified test case 2020-05-17 11:04:02 +10:00
Andrew Murray
df886ed386
Merge pull request #4290 from bluepython508/fix_djpeg_load_test
Fixes djpeg load test
2020-05-16 19:53:18 +10:00
Andrew Murray
aa1761bc9f Replace tiff_jpeg with jpeg compression when saving 2020-05-15 22:37:13 +10:00
Andrew Murray
b3604167ad Change STRIPBYTECOUNTS to LONG if necessary when saving 2020-05-15 20:47:57 +10:00
Andrew Murray
b8ec793898 Fixed ZeroDivisionError in thumbnail 2020-05-15 18:29:52 +10:00
Hugo
837bc0ad9c Fix broken string 2020-05-13 10:21:10 +03:00
Simon Andrieux
15ae39674e fix reading from empty buffer when loading .gbr 2020-05-11 17:38:42 +02:00
nulano
1656edaf41 fix docs compliance for CF_HDROP 2020-05-09 10:44:19 +02:00
nulano
5728662c7f add support for CF_DIBV5, CF_HDROP, and 'PNG' in ImageGrab.grabclipboard() on win32 2020-05-09 09:40:58 +02:00
Stanislau Tsitsianok
305b61ed1c
Added test with various ellipse sizes 2020-05-08 23:54:17 +03:00
Alexander
f15e4a8e06 truncate icclist instead of changing to None 2020-05-08 19:48:20 +03:00
Andrew Murray
59957fb8d8 Added support for 1-D NumPy arrays 2020-05-04 20:07:23 +10:00
Andrew Murray
c04013fa74
Merge branch 'master' into winbuild-rewrite 2020-05-02 00:20:14 +10:00
Rodrigo Benenson
83125b5ae4
Checks over exif instead of reloeaded_exif
test_imagefile.py checks exif instead of reloaded_exif; making the tests pass when they should not.
2020-04-28 18:58:26 +02:00
Andrew Murray
727868d5d7 Increased epsilon to pass on Windows 2020-04-26 08:03:16 +10:00
Andrew Murray
f5e9252b12 Fixed drawing a jointed line with a sequence of numeric values 2020-04-24 18:48:10 +10:00
Andrew Murray
a0641b87c2 Assert that warning is raised 2020-04-20 19:27:09 +10:00
ziplantil
39f4738775 lint 2020-04-19 16:54:53 +03:00
ziplantil
52b9b4310c add test for ico append_images 2020-04-19 16:45:12 +03:00
Hugo
270bc4fc60 Don't show own deprecation warning in test logs 2020-04-19 13:59:40 +03:00
Andrew Murray
e10cab42f1 Consider transparency when drawing text on an RGBA image 2020-04-19 20:56:17 +10:00
Hugo van Kemenade
ddebe27eed
Merge pull request #4565 from radarhere/tiff_pickle
Fixed bug when unpickling TIFF images
2020-04-17 19:03:02 +03:00
Andrew Murray
9956a6c777 Fixed bug when unpickling TIFF images 2020-04-17 22:13:14 +10:00
Andrew Murray
76d96b6383 Removed default arguments from helper functions 2020-04-17 21:57:11 +10:00
Hugo van Kemenade
529e113505
Merge pull request #4561 from hugovk/fix-webp-pickle
Fix pickling WebP
2020-04-17 14:48:50 +03:00
Andrew Murray
e52b8cefe1 Skip test if webp is not available 2020-04-17 20:08:10 +10:00
Hugo
94751da23e Initialise __physical_frame = 0 and add pickle roundtrip tell test 2020-04-17 11:21:57 +03:00
Hugo
654229d1b9 GitHub Actions now sets CI=true 2020-04-16 20:42:29 +03:00
Hugo
913e79f010 Test the modes 2020-04-16 15:52:10 +03:00
Andrew Murray
f21816918e Allow ImageMagick zTXt chunks to be extracted after copy() 2020-04-16 21:14:19 +10:00
Andrew Murray
1e63f772f8 Parse orientation from XMP tags 2020-04-16 21:05:34 +10:00
Hugo
5529aba441 Skip webp test when webp not available 2020-04-16 12:56:12 +03:00
Hugo
cdf3c98103 Add failing test for pickling webp 2020-04-16 11:45:12 +03:00
Hugo
d62b9098dd Refactor other tests into test_pickle_image 2020-04-16 11:44:28 +03:00
Hugo
53a85f2a69 Refactor test_pickle_image to use pytest.mark.parametrize 2020-04-16 11:31:28 +03:00
nulano
9aa42c3fd6 fix AppVeyor 2020-04-12 11:55:31 +10:00
nulano
c6a1c551d9 cleanup build configuration 2020-04-12 11:55:01 +10:00
nulano
15ce881a2b fix appveyor 2020-04-12 11:53:45 +10:00
Andrew Murray
f17f1bc607 Added method argument to single frame WebP saving 2020-04-11 20:43:49 +10:00
Andrew Murray
7bb51a4aca Raise DeprecationWarning on raise_ioerror 2020-04-10 12:57:29 +03:00
Hugo
dda6145fce Since Python 3.3 IOError and WindowsError have been merged into OSError 2020-04-10 12:57:29 +03:00
Andrew Murray
5923f95f31 Adjusted symmetry test 2020-04-10 12:15:01 +10:00
Stanislau Tsitsianok
a491ed6889 fixed failing tests 2020-04-06 22:01:42 +10:00
Andrew Murray
f7144c1216 Added reading and writing of private PNG chunks 2020-04-06 21:57:45 +10:00
Andrew Murray
7475c06b1c Assert that seeking too far raises an EOFError 2020-04-05 15:29:13 +10:00
Andrew Murray
5ef382f612 Test all operating systems 2020-04-04 15:02:15 +11:00
Andrew Murray
6574552821 Removed redundant arguments 2020-04-02 19:17:54 +11:00
Hugo
2e9030ddca Initialise __frame = 0 in open, and test tell 2020-04-02 08:49:26 +03:00
Hugo
1c2b2b085a Add test case 2020-04-01 22:32:14 +03:00
Hugo van Kemenade
46f4a349b8
Merge pull request #4507 from hugovk/fix_tiff
Fix 2 buffer overflows in TIFF decoding
2020-04-01 12:51:04 +03:00
Hugo van Kemenade
ff60894d69
Merge pull request #4505 from hugovk/jpeg2k_overflow
Fix bounds overflow in JPEG 2000 decoding
2020-04-01 12:27:27 +03:00
Hugo van Kemenade
2ef59fdbae
Merge pull request #4504 from hugovk/sgi_fixes
Fix buffer overflow in SGI-RLE decoding
2020-04-01 12:27:14 +03:00
Hugo van Kemenade
0da1eca7cf
Merge pull request #4503 from hugovk/fix_fli_6.2.x
Fix multiple OOB reads in FLI decoding
2020-04-01 12:27:04 +03:00
Hugo
2092801e71 Format with Black 2020-04-01 11:02:50 +03:00
Eric Soroos
6e7c0ced68 Tests for tiff crashes 2020-04-01 11:02:40 +03:00
Hugo
ada137eba5 Fix Flake8 2020-04-01 10:52:21 +03:00
Eric Soroos
124f4bb591 Tests for PCX OOB Access 2020-04-01 10:50:48 +03:00
Hugo
6e86d235c8 Format with Black 2020-04-01 10:34:19 +03:00
Eric Soroos
30443d39bd Tests for jp2 overflow 2020-04-01 10:33:46 +03:00
Hugo
44096adf59 Convert from unittest to pytest 2020-04-01 10:19:15 +03:00
Hugo
78478dfcfb Black and isort 2020-04-01 10:13:12 +03:00
Eric Soroos
dd341f12d6 Tests for SGI Overruns 2020-04-01 10:12:21 +03:00
Hugo
11ef7ca53a Format with Black 2020-04-01 09:54:26 +03:00
Eric Soroos
00c6dd72d9 Tests for additional hits 2020-04-01 09:53:18 +03:00
Eric Soroos
19ff42bd68 tests for Fli OOB reads 2020-04-01 09:53:04 +03:00
Hugo van Kemenade
f27873a888
Merge pull request #4243 from pmrowla/apng
Add APNG support
2020-04-01 00:23:57 +03:00
Hugo van Kemenade
b5cf165f9e
Merge pull request #4260 from nulano/imagegrab_xcb
ImageGrab.grab() for Linux with XCB
2020-03-31 23:03:21 +03:00
Hugo van Kemenade
16e1d6a048
Merge pull request #4494 from hugovk/re-add-PILLOW_VERSION
Re-add deprecated PILLOW_VERSION to give projects more time to upgrade
2020-03-31 22:58:23 +03:00
Hugo van Kemenade
92c9961cea
Convert from unittest to pytest 2020-03-31 22:43:31 +03:00
Hugo van Kemenade
761edafed8
Merge branch 'master' into re-add-PILLOW_VERSION 2020-03-31 12:07:14 +03:00
Marcin Jaworski
37ee51de88 Update test_font_pcf_charsets to adhere to test architecture changes 2020-03-31 10:56:43 +02:00
Marcin Jaworski
85f62c424d Fix tests for charset aware PcfFontFile 2020-03-31 10:20:43 +02:00
Marcin Jaworski
422efd68c3 Add tests for charset aware PcfFontFile 2020-03-31 10:20:43 +02:00
Hugo van Kemenade
c6115c1ceb
Merge pull request #4230 from dwastberg/new_chops
Added three new channel operations
2020-03-31 10:24:44 +03:00
Andrew Murray
750bbc7256 Parametrized test 2020-03-31 17:41:52 +11:00
Andrew Murray
7597a9fbfd Raise warning for more operations 2020-03-31 17:41:47 +11:00
Andrew Murray
027d180eda Raise a DeprecationWarning when comparing PILLOW_VERSION 2020-03-30 21:53:02 +11:00
Andrew Murray
5a511c6a8b
Merge pull request #4474 from radarhere/reduce2
Prevent masking Image reduce method in Jpeg2K
2020-03-30 07:29:21 +11:00
Andrew Murray
d00b929651 Updated test 2020-03-29 16:29:34 +11:00
Andrew Murray
ff6ca4159a Prevent masking Image reduce method 2020-03-29 16:27:29 +11:00
Andrew Murray
30a2d694cf Converted unittest mock to pytest monkeypatch 2020-03-29 10:43:44 +11:00
Andrew Murray
cbf0bf1010 Fixed restoring original state 2020-03-28 12:51:33 +11:00
Andrew Murray
b602f365ae Removed PillowTestCase helper class 2020-03-28 12:51:28 +11:00
Andrew Murray
a8637449b9 Converted common Qt test classes 2020-03-28 12:21:00 +11:00
Andrew Murray
748739c992 Converted addCleanup 2020-03-28 12:20:56 +11:00
Andrew Murray
dcf57f1457 unittest is no longer used in every test [ci skip] 2020-03-27 18:36:36 +11:00
Hugo van Kemenade
3970db0535
Merge pull request #4471 from radarhere/exif_imagemagick
Added reading of earlier ImageMagick PNG EXIF data
2020-03-26 13:42:58 +02:00
Andrew Murray
d4b627b664 Parametrized test 2020-03-26 21:21:40 +11:00
Hugo van Kemenade
332e3923cb
Merge pull request #4457 from radarhere/endian
Fixed endian handling for I;16 getextrema
2020-03-25 23:32:37 +02:00
Andrew Murray
d7c34511ba Updated tests 2020-03-24 19:53:03 +11:00
Andrew Murray
228613017b Added test if XCB is not present 2020-03-24 19:51:13 +11:00
Andrew Murray
2543719e12 Updated error catching 2020-03-24 19:49:05 +11:00
nulano
0bcc7be89b xcb screengrab docs and fixes 2020-03-24 19:46:40 +11:00
nulano
f9c74825a6 xcb screengrab fixes 2020-03-24 19:40:54 +11:00
Andrew Murray
7ff2db143d Removed use of PillowTestCase 2020-03-23 07:05:51 +11:00
Andrew Murray
7859f81828 Use pytest to skip tests 2020-03-23 07:05:40 +11:00
Andrew Murray
ca5a81ef27 Added reading of earlier ImageMagick EXIF data 2020-03-14 00:04:58 +11:00
Andrew Murray
9f61be4c72
Merge branch 'master' into apng 2020-03-09 23:29:40 +11:00
Andrew Murray
dc0d1c9bee Invoke pip using python3 [ci skip] 2020-03-09 22:43:35 +11:00
Andrew Murray
e41cfade29 Add JPEG comment to info dictionary 2020-03-07 06:57:29 +11:00
Hugo van Kemenade
3f9b615349
Merge pull request #4404 from orlnub123/bugfix/thumbnail
Fix size calculation of Image.thumbnail()
2020-03-06 00:33:03 +02:00
Hugo van Kemenade
da4667cc9e
Merge pull request #4401 from radarhere/freetype
Fixed stroke on FreeType < 2.9
2020-03-06 00:21:17 +02:00
Hugo van Kemenade
3b30b88c7f
Merge pull request #4454 from radarhere/bbox
If present, only use alpha channel for bounding box
2020-03-05 12:38:52 +02:00
Andrew Murray
686d85be08
Merge pull request #4462 from hugovk/to-pytest
Convert to use pytest
2020-03-05 19:39:13 +11:00
Hugo van Kemenade
94d0c7c9ff
Merge pull request #45 from radarhere/to-pytest
Converted setup and teardown methods
2020-03-04 13:42:49 +02:00
Hugo
fbd4ca1ba0 Fix roundtrip 2020-03-04 13:21:23 +02:00
Andrew Murray
76734573f0 Converted setup and teardown methods 2020-03-04 21:31:50 +11:00
Hugo van Kemenade
974233be45
Merge pull request #4438 from jdufresne/warning
Warn on typos passed to features.check()
2020-03-02 21:26:17 +02:00
Hugo
2cc6a9a974 Convert to use pytest 2020-03-02 16:31:08 +02:00
Hugo van Kemenade
54b4b98455
Merge pull request #4448 from radarhere/pytest
Converted to pytest
2020-03-02 12:23:28 +02:00
Hugo van Kemenade
64a9e0c660
Merge branch 'master' into apng 2020-02-29 17:40:17 +02:00
Andrew Murray
42a0653097 Fixed endian handling for I;16 getextrema 2020-02-29 20:29:28 +11:00
Andrew Murray
b934b50867 If an alpha channel is present, only use that to get bounding box 2020-02-28 22:33:02 +11:00
Andrew Murray
1c1ad65a96
Merge pull request #4424 from hugovk/fix-im-long-name
Fix saving IM images in dir with long path
2020-02-27 20:27:44 +11:00
Andrew Murray
9ba25f8135 Trim end of name, keeping ext 2020-02-26 20:15:23 +11:00
Hugo van Kemenade
3c995fd173
Merge pull request #4440 from radarhere/jpeg_quality
Allow saving of zero quality JPEG images
2020-02-25 12:02:53 +02:00
Andrew Murray
09b9198176 Converted to pytest 2020-02-25 20:57:27 +11:00
Andrew Murray
17c10b0ca0 Fixed stroke on FreeType < 2.9 2020-02-24 22:49:33 +11:00
Hugo van Kemenade
12f66f44f4
Fix regression
Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2020-02-23 10:31:54 +02:00
Andrew Murray
41a29339ff Lint fixes 2020-02-23 15:14:42 +11:00
Peter Rowlands
9b72f0513c Adjust is_animated behavior
- Make is_animated APNG behavior consistent with other Pillow formats
- is_animated will be true when n_frames is greater than 1 (for APNG
  this depends on animation frame count + presence or absence of a
  default image)
2020-02-23 15:14:06 +11:00
Peter Rowlands
d05b73cd08 Use context manager for APNG tests 2020-02-23 15:14:06 +11:00
Peter Rowlands
0f84fa7707 Move apng tests into test_file_apng.py 2020-02-23 15:14:06 +11:00
Peter Rowlands
00fcc53a1d Fix lint errors 2020-02-23 15:14:06 +11:00
Peter Rowlands
66c84f258b Add test for saving split fdat chunks 2020-02-23 15:14:06 +11:00
Peter Rowlands
7c0df1034f Add APNG test cases
Includes tests for reading and writing APNG files.

The tests for reading files are based on the APNG browser compatibility
tests from https://philip.html5.org/tests/apng/tests.html
(which is linked in the Tests section of https://wiki.mozilla.org/APNG_Specification)
2020-02-23 15:14:06 +11:00
Hugo
44e661f25a Convert to use pytest 2020-02-22 23:03:01 +02:00
Hugo
699a9dadf1 Convert asserts 2020-02-22 18:07:04 +02:00
Andrew Murray
8482919a37 Converted most assert statements to pytest 2020-02-23 00:06:21 +11:00
orlnub123
8f21d0ddf0 Improve rounding 2020-02-21 23:38:38 +00:00
Andrew Murray
a8c0794107 Allow saving of zero quality JPEG images 2020-02-21 22:05:44 +11:00
Hugo van Kemenade
f43efb0aec
_webp not needed in this file
Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2020-02-20 12:24:46 +02:00
Hugo
2d5e479bcc Merge remote-tracking branch 'upstream/master' into pytest.importorskip 2020-02-19 19:26:52 +02:00
Andrew Murray
c516134890 Rearranged code for Windows 2020-02-19 20:56:23 +11:00
Andrew Murray
c6749183f8 Updated tests 2020-02-19 19:52:07 +11:00
Dag Wästberg
2e02500fa6 change function names to snake_case 2020-02-19 19:38:53 +11:00
Dag Wästberg
23c9da5264 add Overlay chop 2020-02-19 19:34:13 +11:00
Dag Wästberg
705140cc2c add hardlight and softlight chops 2020-02-19 19:30:59 +11:00
Dag Wästberg
13c1b7070d add Overlay chop 2020-02-19 19:24:36 +11:00
Dag Wästberg
5e5dfbad81 add hardlight and softlight chops 2020-02-19 19:23:09 +11:00
Jon Dufresne
c057ad1535 Warn on typos passed to features.check()
If the feature isn't one of the recognized types, a UserWarning is
emitted.
2020-02-18 19:48:48 -08:00
Jon Dufresne
4f185329f4 Streamline test skipping based on supported features
This adds a new test decorator: skip_unless_feature(). The argument is
the same as passed to features.check(). If the feature is not supported,
the test will be skipped.

This removes several kinds of boilerplate copied and pasted around tests
so test feature checking is handled and displayed more consistently.

Refs #4193
2020-02-18 13:07:01 -08:00
Jon Dufresne
f72e64b90b Remove unnecessary setup_module() from test_file_tar.py
The test_sanity() already checks the decorder exists and the other tests
can run without zlib/jpeg installed.
2020-02-18 13:02:30 -08:00
Jon Dufresne
967f46d1d8 Remove unnecessary skip test logic
The gif_encoder and gif_decoder are always compiled and included in
src/_imaging.c.
2020-02-18 13:02:30 -08:00
Hugo van Kemenade
2d4b4576aa
Merge pull request #4428 from jdufresne/use-mock
Replace SimplePatcher with builtin unittest.mock module
2020-02-18 16:08:28 +02:00
Hugo
d289a5b072 Convert to use pytest 2020-02-18 15:50:34 +02:00
Hugo
17c67a2cfb Use pytest.importorskip to skip on a missing import dependency 2020-02-18 14:30:56 +02:00
Hugo van Kemenade
8ec548d163
Merge pull request #4431 from jdufresne/top
Move safe imports to the top of test files
2020-02-17 22:34:57 +02:00
Hugo van Kemenade
9f2d478f03
Merge pull request #4429 from jdufresne/cpickle
Remove testing of Python-2-only cPickle module
2020-02-17 21:48:43 +02:00
Jon Dufresne
98a2081a78 Move safe imports to the top of test files
These modules are safe to import and this better follows PEP 8.

From https://www.python.org/dev/peps/pep-0008/#imports

> Imports are always put at the top of the file, just after any module
> comments and docstrings, and before module globals and constants.
2020-02-17 10:49:27 -08:00
Jon Dufresne
9e856b8a72 Remove testing of Python-2-only cPickle module
In Python 3, cPickle and pickle have been merged to a single module.

From https://docs.python.org/3/whatsnew/3.0.html#library-changes

> A common pattern in Python 2.x is to have one version of a module
> implemented in pure Python, with an optional accelerated version
> implemented as a C extension; for example, pickle and cPickle. This
> places the burden of importing the accelerated version and falling
> back on the pure Python version on each user of these modules. In
> Python 3.0, the accelerated versions are considered implementation
> details of the pure Python versions. Users should always import the
> standard version, which attempts to import the accelerated version and
> falls back to the pure Python version. The pickle / cPickle pair
> received this treatment.

Can now move the 'import pickle' to the top of the test file.
2020-02-17 10:27:36 -08:00
Jon Dufresne
1a3ebafdd2 Replace SimplePatcher with builtin unittest.mock module
The class more or less duplicates the features of the mock module. Can
avoid the duplication by using the stdlib.
2020-02-17 10:06:19 -08:00
Jon Dufresne
6121daa72d Remove redundant str() call
The %s placeholder already coerces arguments to a string.
2020-02-17 09:18:49 -08:00
Hugo
946a038b13 Replace unittest with pytest 2020-02-17 10:42:33 +02:00
Hugo
eb2d6560a4 Replace unittest with pytest 2020-02-17 00:55:52 +02:00
orlnub123
64c08f4dba Fix test 2020-02-16 21:26:40 +11:00
orlnub123
6d3c7d6941 Add test against upscaling 2020-02-16 21:26:17 +11:00
orlnub123
e9ef1d236d Fix size calculation of Image.thumbnail() 2020-02-16 21:25:51 +11:00
Andrew Murray
8e81e0dd0e Restored test 2020-02-16 13:44:34 +11:00
Hugo
9087599e60 Merge remote-tracking branch 'upstream/master' into pytest 2020-02-15 16:56:21 +02:00
Hugo van Kemenade
852d9156bc
Remove commas
Co-Authored-By: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2020-02-15 16:21:37 +02:00
Hugo van Kemenade
0e993c4740
Merge pull request #4334 from radarhere/outline_width
Allow explicit zero width to hide outline
2020-02-15 14:30:12 +02:00
Andrew Murray
f958e2f8ed Return strings or bytes from ContainerIO according to the file object mode 2020-02-15 22:13:10 +11:00
Jon Dufresne
e817ed0d3e Correct str/bytes mixup in ContainerIO
Image data is expected to be read in bytes mode, not text mode so
ContainerIO should return bytes in all methods. The passed in file
handler is expected to be opened in bytes mode (as TarIO already does).
2020-02-15 22:13:10 +11:00
Andrew Murray
919abe2555 Updated test 2020-02-15 21:17:26 +11:00
Hugo van Kemenade
c57e4b3a85
Merge pull request #4333 from radarhere/polygon
Only draw each polygon pixel once
2020-02-15 11:57:14 +02:00
ben
a4721d374f Fixes djpeg load test
* Test fails with `libjpeg-turbo` and `libjpeg-progs` on Ubuntu 16.04
* Epsilon reported is 4.18...
2020-02-15 13:59:53 +11:00
Jon Dufresne
e544fd5fb7 Simplify command discovery with stdlib shutil.which()
Use the builtin shutil.which() instead of reimplementing.

For the single use that used the output of the command, use
subprocess.run().
2020-02-14 14:55:46 -08:00
Hugo
affade7595 Replace unittest with pytest 2020-02-13 12:15:05 +02:00
Hugo van Kemenade
098406c304
Merge pull request #4390 from jdufresne/resource-warning
Fix ResourceWarning emitted during tests
2020-02-12 17:10:51 +02:00
Hugo
38bf862185 Replace PillowTestCase.assert_warning with pytest.warns 2020-02-03 11:11:32 +02:00
Hugo
a4bf9fa036 Convert most PillowTestCase methods to pytest 2020-02-02 12:26:01 +02:00
Hugo van Kemenade
f6e067b3b4
Merge pull request #4391 from radarhere/pytest
Convert various tests to pytest style
2020-01-28 18:22:11 +02:00
Andrew Murray
eeb2588fe2
Corrected skip condition
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-01-28 19:59:41 +11:00
Alexander Karpinsky
5965437402
Merge pull request #4370 from uploadcare/jpeg-multiple-app13
Handle multiple and malformed JPEG APP13 markers
2020-01-27 15:46:36 +03:00
Andrew Murray
7fd9663198 Convert various tests to pytest style 2020-01-27 22:46:52 +11:00
Jon Dufresne
2b84221edf Fix ResourceWarning emitted during tests
Appeared in the form:

    ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/invalid-exif-without-x-resolution.jpg'>

Enable all warnings to always display during tests to help catch these
warnings earlier.
2020-01-26 16:00:46 -08:00
Hugo van Kemenade
22a6738a81
Merge pull request #4369 from jdufresne/pytest
Convert some tests to pytest style
2020-01-26 20:18:37 +02:00
Jon Dufresne
63729766c4 Remove unnecessary coerce to float
In Python 3, the division operator is floating point division. No longer
need to coerce integers to floating point numbers before division.
2020-01-26 06:33:18 -08:00
Alexander
73171f5046 add test image 2020-01-20 17:25:40 +03:00
Jon Dufresne
2c50723f14 Convert some tests to pytest style
To better follow conventional pytest style, this removes the outer
wrapper class in favor of a function for some tests. These tests were
picked as they are relatively simple and presented no barriers to a
quick port. The assert* methods are replaced with assert statements.
When necessary, a fixture is used to create a temporary directory.

This commit does not convert the entire test suite to this style as some
test classes use methods or other advanced features that are difficult
to automatically convert. The goal is to address these issues in
followup commits.

Refs #4193
2020-01-18 12:12:10 -08:00
Andrew Murray
760bc7dd38 Test seek errors 2020-01-14 21:38:17 +11:00
Andrew Murray
f3f9190de7 Roundtrip test hotspot 2020-01-14 21:38:17 +11:00
Andrew Murray
dbd3c7c9b9 Test saving with incorrect mode 2020-01-14 21:38:17 +11:00
Andrew Murray
9bed79e426 Test grab bbox 2020-01-14 21:38:17 +11:00
Andrew Murray
5439091355 Simplified code 2020-01-14 20:20:30 +11:00
Andrew Murray
a5f036abf4 Moved messages into assert method calls 2020-01-14 20:20:19 +11:00
Andrew Murray
d324560891 Removed print 2020-01-14 19:44:10 +11:00
Andrew Murray
a4f06b93f9 Removed unused function 2020-01-14 19:40:21 +11:00
Hugo
5e9336af4c Use sys.byteorder == "big" 2020-01-08 15:43:28 +02:00
Hugo
f96763826c Test on new Travis CPUs https://blog.travis-ci.com/2019-11-12-multi-cpu-architecture-ibm-power-ibm-z 2020-01-08 15:43:27 +02:00
Andrew Murray
56f30ef792 Allow explicit zero width to hide outline 2020-01-08 21:55:15 +11:00
Andrew Murray
8e8f63d4a5 Only draw each polygon pixel once 2020-01-05 17:43:51 +11:00
Andrew Murray
b9c68540dc Overflow checks for realloc for tiff decoding 2020-01-02 15:24:46 +11:00
Andrew Murray
be44f0d992 Catch SGI buffer overruns 2020-01-02 15:24:36 +11:00
Andrew Murray
8f0c8f7311 Catch PCX P mode buffer overrun 2020-01-02 15:24:16 +11:00
Andrew Murray
c40bc25847 Catch FLI buffer overrun 2020-01-02 15:23:36 +11:00
Andrew Murray
138bd714f5 Raise an error for an invalid number of bands in FPX image 2020-01-02 15:20:24 +11:00
Andrew Murray
4203845a24
Merge pull request #4320 from uploadcare/rgb2l-rounding-error
Fix rounding error on RGB to L conversion
2020-01-01 20:09:34 +11:00
Andrew Murray
e8bb2dd93e Allow string comment when saving GIF 2020-01-01 13:29:39 +11:00
nulano
6bf7f6045d fix deprecation warnings in test_file_wmf 2020-01-01 01:55:06 +01:00
Andrew Murray
8924054dd9 Changed _limit_signed_rational 2019-12-31 19:12:33 +11:00
Andrew Murray
69fc041399 Test out of bounds signed rational 2019-12-31 19:11:03 +11:00
Alexander
fa1deca144 Fix wrong tests 2019-12-31 04:12:50 +03:00
Andrew Murray
74d53bcd15 Lint fixes 2019-12-31 11:58:39 +11:00
Andrew Murray
6d3fb7b083
Merge branch 'master' into exif-writing-fixes 2019-12-31 11:38:33 +11:00
Andrew Murray
f72e866b5e
Merge pull request #4305 from radarhere/remove_distutils
Replaced distutils with C version check
2019-12-31 11:33:39 +11:00
Andrew Murray
f77c409742 Renamed variable 2019-12-31 09:04:25 +11:00
Alexander
c74c20eb9f Merge branch 'master' into reduce-in-resize
# Conflicts:
#	docs/releasenotes/7.0.0.rst
2019-12-30 03:24:38 +03:00
Andrew Murray
2a0653ee81
Merge pull request #4311 from radarhere/wmf
Allow loading of WMF images at a given DPI
2019-12-30 10:24:44 +11:00
nulano
cc5c0d2c04 don't skip test fixed in pypy 7.3.0 2019-12-29 22:52:50 +01:00
Andrew Murray
61d0784933 Allow loading of WMF images at a given DPI 2019-12-28 11:25:39 +11:00
Andrew Murray
34d04d3e82 Replaced distutils with C version check 2019-12-28 09:57:49 +11:00
Alexander
222c2f6978 Merge branch 'master' into reduce-in-resize 2019-12-27 15:13:19 +03:00
Alexander Karpinsky
5f69035865
Merge pull request #4251 from uploadcare/reduce
Reduce operation
2019-12-27 15:11:47 +03:00
Alexander
fc0248869c wording 2019-12-27 14:27:37 +03:00