Commit Graph

3151 Commits

Author SHA1 Message Date
Ondrej Baranovič
14671f715f
Merge branch 'master' into sbix 2021-03-07 20:05:25 +01:00
Hugo van Kemenade
6108596ff8
Merge pull request #5289 from radarhere/ipythonviewer 2021-03-07 14:26:50 +02:00
Hugo van Kemenade
3a27118d76
Merge pull request #5183 from radarhere/rectangle
Only draw each rectangle outline pixel once
2021-03-07 12:25:45 +02:00
Hugo van Kemenade
f15f573e51
Merge pull request #5224 from radarhere/mapper 2021-03-07 11:51:46 +02:00
Hugo van Kemenade
a95fee0475
Merge pull request #5215 from radarhere/license
Document license for several fonts
2021-03-07 11:41:56 +02:00
Hugo van Kemenade
f9b830f058
Merge pull request #5214 from radarhere/pcx
Handle PCX images with an odd stride
2021-03-07 11:41:14 +02:00
Hugo van Kemenade
95986f38da
Merge pull request #5168 from radarhere/mpo 2021-03-07 11:38:36 +02:00
Andrew Murray
690cf9ebe2 Allow alpha_composite destination to be negative 2021-03-06 20:54:21 +11:00
Andrew Murray
5269ab13a7 Lint fix 2021-03-06 10:20:01 +11:00
Eric Soroos
480f6819b5 Fix Memory DOS in Icns, Ico and Blp Image Plugins
Some container plugins that could contain images of other formats,
such as the ICNS format, did not properly check the reported size of
the contained image. These images could cause arbitrariliy large
memory allocations.

This is fixed for all locations where individual *ImageFile classes
are created without going through the usual Image.open method.
2021-03-06 10:19:14 +11:00
Andrew Murray
346bfc9537 Added IPythonViewer 2021-03-04 08:55:24 +11:00
Eric Soroos
cbdce6c5d0 Fix for CVE-2021-25291
* Invalid tile boundaries lead to OOB Read in TiffDecode.c, in TiffReadRGBATile
* Check the tile validity before attempting to read.
2021-03-01 19:04:48 +11:00
Eric Soroos
86f02f7c70 Fix negative size read in TiffDecode.c
* Caught by oss-fuzz runs
* CVE-2021-25290
2021-03-01 19:04:42 +11:00
Eric Soroos
4853e522bd Fix OOB read in SgiRleDecode.c
* From Pillow 4.3.0->8.1.0
* CVE-2021-25293
2021-03-01 19:04:19 +11:00
Eric Soroos
3fee28eb94 Incorrect error code checking in TiffDecode.c
* since Pillow 8.1.0
* CVE-2021-25289
2021-03-01 18:51:13 +11:00
Andrew Murray
3e670d7737 Migrated from deprecated numpy bool and float 2021-02-26 20:59:11 +11:00
Andrew Murray
297789284b Fixed linear_gradient and radial_gradient 32-bit modes 2021-02-22 19:32:52 +11:00
Andrew Murray
8fb5fd7f63 Updated tests for changed helper imports 2021-02-22 12:14:49 +11:00
nulano
c709aa3d28 minor test formatting cleanup 2021-02-22 12:03:01 +11:00
nulano
61ee8ec03c document and add tests for SBIX color font support 2021-02-22 12:00:20 +11:00
Andrew Murray
c0ee869c2c Only draw each rectangle outline pixel once 2021-02-22 07:48:58 +11:00
Andrew Murray
e763f8f2be Save interop IFD when converting Exif to bytes 2021-02-22 07:47:59 +11:00
Andrew Murray
4b14f0102d Save base IFDs when converting Exif to bytes 2021-02-22 07:47:05 +11:00
Andrew Murray
faf8fad76d Stopped flattening EXIF IFD into getexif() 2021-02-22 07:47:05 +11:00
Andrew Murray
3495b319bd Replaced various instances of assert_image_similar with assert_image_similar_tofile 2021-02-21 22:22:29 +11:00
Andrew Murray
a5c251029c Replaced various instances of assert_image_equal with assert_image_equal_tofile 2021-02-21 22:15:56 +11:00
Hugo van Kemenade
1857bf5570
Merge pull request #5259 from radarhere/warns 2021-02-17 21:31:15 +02:00
Andrew Murray
a1b4b026ff Added pragma no cover 2021-02-14 07:58:16 +11:00
Andrew Murray
83542c42bf Added context managers 2021-02-11 21:43:54 +11:00
Andrew Murray
4a0569e97f Changed zero length assertions to falsy 2021-02-11 13:48:31 +11:00
Andrew Murray
01be700081 Fixed asserting that no warnings were raised 2021-02-10 23:37:55 +11:00
Andrew Murray
57d6e8ca43 Added PyQt6 support 2021-02-10 21:12:32 +11:00
Andrew Murray
bc0c0cb11a
Merge pull request #5250 from Piolie/open_formats_case
Changed Image.open formats parameter to be case-insensitive
2021-02-08 18:19:02 +11:00
Piolie
4a9a999dbb
Update Tests/test_image.py
Keep the original test cases; add the most likely non-uppercase versions.

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2021-02-05 12:21:27 -03:00
Piolie
0c1675a143 Make formats parameter in Image.open accept aNy cAsE 2021-02-04 22:47:53 -03:00
Andrew Murray
63f21609c0 Added context manager 2021-02-02 23:39:53 +11:00
Andrew Murray
11cb3fba9c Added test 2021-01-30 13:01:42 +11:00
Andrew Murray
e4b9f88de4 Updated test now that Win32 uses map_buffer 2021-01-30 12:59:45 +11:00
Andrew Murray
eb7e5d2797 Moved test that requires libtiff 2021-01-29 08:00:37 +11:00
Andrew Murray
b39977e1c2 Document license for several fonts 2021-01-21 21:33:35 +11:00
Andrew Murray
ac31061f22 Handle PCX images with an odd stride 2021-01-21 19:29:11 +11:00
wiredfool
e40a07bca6
Merge pull request #5150 from wiredfool/valgrind_tests
Support for ignoring tests when running valgrind
2021-01-16 16:56:55 +00:00
Eric Soroos
1d0149c369 feck8 2021-01-07 15:26:23 +01:00
Eric Soroos
a6fa139f62 useless reptile 2021-01-07 14:57:49 +01:00
Eric Soroos
1d7c8e03d0 known failing tests from valgrind -- uninitialized values 2021-01-07 14:52:02 +01:00
Andrew Murray
a58ff327d4 Moved imports to top of file 2021-01-07 14:52:02 +01:00
Andrew Murray
59ee809f13 Updated capitalisation
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2021-01-07 14:52:02 +01:00
Andrew Murray
d35995f945 Lint fixes 2021-01-07 14:52:02 +01:00
Eric Soroos
bd38487324 Ignore this test in valgrind -- the metadata values don't make logical sense. 2021-01-07 14:52:02 +01:00
Eric Soroos
59ed81f838 Add pytest configuration for patching around an unknown valgrind mark 2021-01-07 14:52:02 +01:00
Andrew Murray
eaeaa181dd
Removed unused import 2021-01-07 23:18:24 +11:00
Eric Soroos
37a7c601cc uglify 2021-01-07 13:07:28 +01:00
Eric Soroos
ffbaa6523d Internal support for oss-fuzz testing 2021-01-07 12:55:11 +01:00
Andrew Murray
c8dd1c8422
Merge pull request #5175 from radarhere/tiff
Fix TIFF OOB Write error
2021-01-02 21:13:28 +11:00
Andrew Murray
0117694533
Merge pull request #5174 from radarhere/pcx
Fix for Read Overflow in PCX Decoding
2021-01-02 21:00:25 +11:00
Andrew Murray
903c67353d Lint fix 2021-01-02 20:41:17 +11:00
Eric Soroos
2f409261eb Fix for CVE CVE-2020-35655 - Read Overflow in PCX Decoding.
* Don't trust the image to specify a buffer size
2021-01-02 20:38:46 +11:00
wiredfool
eb8c1206d6 Fix CVE-2020-35654 - OOB Write in TiffDecode.c
* In some circumstances with some versions of libtiff (4.1.0+), there
  could be a 4 byte out of bound write when decoding a YCbCr tiff.
* The Pillow code dates to 6.0.0
* Found and reported through Tidelift
2021-01-02 20:37:48 +11:00
Andrew Murray
1cbb12fb6e Lint fix 2021-01-02 20:19:26 +11:00
Eric Soroos
7e95c63fa7 Fix for SGI Decode buffer overrun CVE-2020-35655
* Independently found by a contributor and sent to Tidelift, and by Google's OSS Fuzz.
2021-01-02 20:09:58 +11:00
Hugo van Kemenade
07bbc46589
Merge pull request #5149 from wiredfool/gif_write_oob_read 2021-01-02 10:14:17 +02:00
Hugo van Kemenade
effa65cb38 Refactor 2021-01-01 20:37:16 +02:00
Hugo van Kemenade
4e3dc9a06b Add support for PySide6 2021-01-01 20:34:44 +02:00
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
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
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
Andrew Murray
f886bc973b Moved string_dimension image to pillow-depends 2020-10-19 21:32:56 +11: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