Commit Graph

35 Commits

Author SHA1 Message Date
Andrew Murray
ad07b04678 Maximum maxval is 65535 2022-03-10 09:55:47 +11:00
Andrew Murray
4283a604c0 Added support for arbitrary maxval 2022-03-09 22:29:45 +11:00
Andrew Murray
72b7ab54bd pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
Andrew Murray
f7504b1ef9 Changed variable 2022-03-04 15:49:37 +11:00
Andrew Murray
4f8173f53f Refactored to reduce risk of infinite loop 2022-03-04 15:22:47 +11:00
Andrew Murray
f5b9e2c43a Explicitly check if magic number is empty 2022-03-04 12:29:20 +11:00
Andrew Murray
3426052874 Removed re-raising of exception 2022-03-04 12:27:28 +11:00
Andrew Murray
cb4e26783f Retain variable case for backwards compatibility 2022-03-04 12:27:14 +11:00
Andrew Murray
e2e87d73c3 Reverted SyntaxError change to match other plugins 2022-03-04 12:26:55 +11:00
Piolie
9c2cbcf452
Keep case consistency in error messages
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2021-03-22 13:06:16 -03:00
Piolie
b6f6fba8cf Rewrite _ignore_comment as one-liner 2021-01-31 01:40:43 -03:00
Piolie
b43654d159 Change variable name in _read_magic() 2021-01-31 01:40:43 -03:00
Piolie
39288f0fb0 Create maxval variable 2021-01-31 01:40:32 -03:00
Piolie
50522d932e Change max token size to 10
- ...so as not to reject "2,147,483,647" (2 ** 31 - 1);
- reword exception message.
2021-01-31 01:35:25 -03:00
Piolie
73fed77c0c Suppress exception context 2021-01-06 14:46:30 -03:00
Piolie
5d0ad5e2e9 Revert exception types to ValueError 2021-01-06 01:21:01 -03:00
Piolie
4dbe244e42 Add token limit 2021-01-06 01:07:14 -03:00
Piolie
d2ad27d70a Correctly check magic number 2021-01-05 00:08:15 -03:00
Piolie
6b81e34d67 Improve handling of PPM headers 2020-12-21 22:39:27 -03: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
e5486b40f8 Merge remote-tracking branch 'upstream/master' into rm-2.7 2019-11-18 13:56:42 +02:00
Hugo
0c5895470c Remove deprecated __version__ from plugins 2019-11-05 17:01:03 +02:00
Hugo
538d9e2e5d Upgrade Python syntax with pyupgrade --py3-plus 2019-10-07 14:30:59 +03:00
Hugo
53a7e35004 Format with Black 2019-06-10 18:22:46 +03:00
Andrew Murray
319d6f2af9 Restored newline at end of file 2019-03-06 08:06:19 +11:00
Andrew Murray
7d3b8e8cea
Merge branch 'master' into mime-types 2019-03-06 07:08:00 +11:00
Hugo
353d2a34ed
Update src/PIL/PpmImagePlugin.py
Co-Authored-By: radarhere <3112309+radarhere@users.noreply.github.com>
2019-03-06 00:01:56 +11:00
Andrew Murray
4be51c46eb Added mime types 2019-03-04 18:17:12 +11:00
pirate486743186
a62c825922 adding some missing mime types and extensions
for reference

https://en.wikipedia.org/wiki/BMP_file_format
https://en.wikipedia.org/wiki/ICO_(file_format)
https://en.wikipedia.org/wiki/Pcx
https://en.wikipedia.org/wiki/Netpbm_format
https://en.wikipedia.org/wiki/.tga
2019-03-04 15:44:39 +11:00
Jon Dufresne
a11fed32b3 Deprecate PIL.*ImagePlugin.__version__ attributes
Use PIL.__version__ instead.
2019-02-02 17:39:55 -08:00
Andrew Murray
0adeb82e98 Changed Image size property to be read-only by default 2018-09-30 13:45:18 +10:00
Andrew Murray
c2189235af Line too long 2018-07-02 19:26:02 +10:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
Andrew Murray
6930d871eb Removed unused import 2018-03-04 21:36:33 +11:00
wiredfool
0bb3f4fee9 source layout reorg 2017-12-28 14:49:47 +00:00