Hugo van Kemenade
2ae55ccbda
Improve exception traceback readability
2022-12-30 00:07:52 +02:00
Andrew Murray
3ec8fa6147
Do not trust JPEG decoder to determine image is CMYK
2022-11-30 13:49:07 +11:00
Andrew Murray
f7363c1091
Decode JPEG compressed BLP1 data in original mode
2022-10-23 15:54:55 +11:00
Andrew Murray
bcded33cee
Merge pull request #6195 from hugovk/cleanup
...
Cleanup: various
2022-04-26 18:51:44 +10:00
Hugo van Kemenade
ee85e387ba
Remove redundant parentheses
2022-04-10 23:39:54 +03:00
Hugo van Kemenade
4cb8e4b3fa
Add deprecations helper
2022-04-06 13:19:52 +03:00
Andrew Murray
54a4a38e42
Return -1 when finished decoding
2022-03-08 19:48:58 +11:00
Andrew Murray
e36774617c
Added BLP1 saving
2022-02-25 23:58:13 +11:00
Andrew Murray
1859bc3462
Added reading non-JPEG BLP1 as RGBA
2022-02-25 17:50:21 +11:00
Andrew Murray
3ec928251c
Fixed reading uncompressed BLP2 with alpha
2022-02-25 16:54:53 +11:00
Andrew Murray
169025df6c
Added BLP saving
2022-02-25 16:53:53 +11:00
Andrew Murray
747029bea9
Simplified code
2022-02-25 16:07:32 +11:00
Hugo van Kemenade
3d33987d7c
Merge pull request #4685 from Meithal/patch-3
...
Correctly read JPEG compressed BLP images
2022-02-19 11:03:36 +02:00
Hugo van Kemenade
07741c9315
Merge pull request #5954 from radarhere/enum
2022-02-18 15:53:41 +02:00
Andrew Murray
985e4fbe40
Simplified code
2022-02-17 22:22:34 +11:00
Andrew Murray
bba493d702
Replaced absolute PIL import with relative import
2022-02-15 21:50:20 +11:00
Andrew Murray
1be53c8bb3
Removed debugging
2022-01-18 09:08:50 +11:00
Andrew Murray
ed8073e846
Deprecated constants in favour of enums
2022-01-15 10:07:07 +11:00
Andrew Murray
f8e4e9c2dd
Added enums
2022-01-15 09:02:31 +11:00
Andrew Murray
8e9da1559b
Lint fix
2021-12-30 14:47:59 +11:00
Meithal
a139b97845
Cleanup
2021-07-15 20:48:47 +02:00
Meithal
3fbc9eb229
self.mode = "BGRA" wasn't correct and captured by #affa059
2021-07-15 20:33:35 +02:00
Meithal
919f38e3d9
Try test
2021-07-05 00:20:15 +02:00
Meithal
d9c14e9ccd
Merge branch 'master' into patch-3
2021-07-04 13:14:43 +02:00
Andrew Murray
60da129d4b
Replaced register_open lambdas with _accept method for consistency
2021-04-03 21:51:28 +11:00
Eric Soroos
496245aa43
Fix BLP DOS -- CVE-2021-28678
...
* BlpImagePlugin did not properly check that reads after jumping to
file offsets returned data. This could lead to a DOS where the
decoder could be run a large number of times on empty data
* This dates to Pillow 5.1.0
2021-04-01 17:17:35 +03:00
Andrew Murray
04922cba2b
Merge branch 'master' into patch-3
2021-03-29 21:30:53 +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
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
Ram Rachum
2f0d430807
Fix exception causes all over the codebase
2020-06-21 13:21:25 +03:00
Meithal
096d2bf64a
Coverage change fix
2020-06-12 18:48:15 +02:00
Meithal
bed2ed7438
Fixes BLP1 picture handling
2020-06-12 09:08:20 +02:00
Hugo
cc63f66575
Merge remote-tracking branch 'upstream/master' into rm-2.7
2019-11-01 13:22:56 +02:00
Andrew Murray
d9845c14c8
Lint fixes
2019-10-29 22:42:34 +11:00
Hugo
538d9e2e5d
Upgrade Python syntax with pyupgrade --py3-plus
2019-10-07 14:30:59 +03:00
Jon Dufresne
d50445ff30
Introduce isort to automate import ordering and formatting
...
Similar to the recent adoption of Black. isort is a Python utility to
sort imports alphabetically and automatically separate into sections. By
using isort, contributors can quickly and automatically conform to the
projects style without thinking. Just let the tool do it.
Uses the configuration recommended by the Black to avoid conflicts of
style.
Rewrite TestImageQt.test_deprecated to no rely on import order.
2019-07-06 16:11:35 -07:00
Hugo
53a7e35004
Format with Black
2019-06-10 18:22:46 +03:00
Andrew Murray
0adeb82e98
Changed Image size property to be read-only by default
2018-09-30 13:45:18 +10:00
Lucy Phipps
98cff5320a
unpack_from is faster than unpack of slice
2018-06-24 18:00:22 +01:00
wiredfool
3a77758d9a
Convert BlpImagePlugin to use Pydecoder framework
2018-03-06 18:16:26 +02:00
Jerome Leclanche
73d7fff16e
blp: Separate BLP1 and BLP2 decoding more cleanly
2018-03-06 18:16:26 +02:00
Jerome Leclanche
fcba3583c3
blp: Simplify dxt1/dxt3/dxt5 decoding
2018-03-06 18:16:26 +02:00
Jerome Leclanche
adaa703576
Add support for BLP file format
2018-03-06 18:16:26 +02:00