Andrew Murray
06c331af5d
Added type hints to frombuffer
2024-09-06 15:16:59 +10:00
Hugo van Kemenade
eaeda4a6be
Merge pull request #8339 from radarhere/type_hint
2024-09-04 14:57:01 +03:00
Andrew Murray
e47b181084
Added type hints
2024-08-31 18:48:16 +10:00
Andrew Murray
d00f3656a6
Changed im.tile to never be None
2024-08-30 22:28:03 +10:00
Andrew Murray
eae107ceb2
Merge branch 'main' into type_hint_init
2024-08-28 08:31:09 +10:00
Andrew Murray
497080f63b
Added type hint to ImageFile._save tile parameter
2024-08-15 07:30:01 +10:00
Andrew Murray
4d0e8e74b4
Use im property
2024-08-10 10:20:08 +10:00
Andrew Murray
8f1157a61d
Added type hints to Image.__init__()
2024-08-02 23:30:27 +10:00
Andrew Murray
8a05e32336
Added type hints
2024-07-08 20:09:45 +10:00
Andrew Murray
1eb960f7e3
Added type hints
2024-06-11 23:26:00 +10:00
Andrew Murray
2d1fe7572f
Added type hints
2024-06-10 14:15:28 +10:00
Andrew Murray
b3c534cc9a
Added type hints
2024-06-05 08:29:28 +10:00
Andrew Murray
6036d81d97
Added type hints
2024-05-04 20:51:54 +10:00
Andrew Murray
e2a57263c7
Reduced duplicate code
2024-04-10 20:37:44 +10:00
Andrew Murray
98ae91a65d
Added BGXR and BGAR unpackers
2024-04-09 00:45:48 +10:00
Jonah Jeleniewski
9e5b9fb18f
Improve comments around bitmap info headers
2024-04-08 22:38:06 +10:00
Jonah Jeleniewski
a1a2202ebe
Add support for bitmaps with header size 56
...
Size 56 is the undocumented `BITMAPV3INFOHEADER`.
It adds the alpha bit mask.
The format is known to be supported by:
- Windows (MS paint, etc.)
- Adobe Photoshop
- Popular web browsers
2024-04-08 22:38:06 +10:00
Jonah Jeleniewski
2f3281dcda
Add support for bitmaps with header size 52
...
Size 52 is the undocumented `BITMAPV2INFOHEADER`.
It adds the RGB bit masks.
The format is known to be supported by:
- Adobe Photoshop
- Popular web browsers
2024-04-08 21:18:19 +10:00
Andrew Murray
48b270590c
accept returns bool or str
2024-04-06 18:31:08 +02:00
Andrew Murray
f69168523e
Do not calculate destination length each time
2024-04-01 15:24:10 +11:00
Hugo van Kemenade
43b2f61e79
Add 'from __future__ import annotations' using Ruff/isort
2023-12-21 13:13:31 +02:00
pre-commit-ci[bot]
eb8405baa0
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2023-11-06 13:24:42 +00:00
Christian Clauss
fd59f91d17
ruff: Minor optimizations of list comprehensions, x in set, etc.
2023-11-06 19:13:47 +06:00
Andrew Murray
d682c18ded
Use "gray" more consistently
2023-10-19 19:12:01 +11:00
Andrew Murray
9979a822c7
Changed Image mode property to be read-only by default
2023-07-29 09:28:18 +10:00
pre-commit-ci[bot]
24183d652e
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2023-02-06 19:27:19 +00:00
Hugo van Kemenade
2ae55ccbda
Improve exception traceback readability
2022-12-30 00:07:52 +02:00
Andrew Murray
cf46156345
Moved comment back [ci skip]
2022-10-24 17:07:57 +11:00
Andrew Murray
6c8234bef3
Combined BMP RLE decoders
2022-10-22 19:54:54 +11:00
Nathanael Gentry
cc45886bc3
Revert unintentional change
2022-10-21 20:59:16 -04:00
pre-commit-ci[bot]
f2dfd0bfb3
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2022-10-21 23:41:29 +00:00
Nathanael Gentry
70e3e4fb10
BMP: Add 4-bit RLE decoder
2022-10-21 19:45:41 -04:00
Andrew Murray
8b2d70d17a
Corrected BMP palette size when saving
2022-09-14 19:54:36 +10:00
Andrew Murray
9f6a315092
Added ABGR MASK_MODE
2022-07-14 07:25:28 +10:00
Andrew Murray
2b9d48403a
Reordered SUPPORTED to match MASK_MODES
2022-07-14 07:08:25 +10:00
Andrew Murray
3e8a9b2165
Fixed loading L mode RLE8 images
2022-06-20 21:01:10 +10:00
Hugo van Kemenade
830da5c41e
Rewrite dict creation as dict literal for better performance
2022-04-10 23:39:54 +03:00
Andrew Murray
039b7ecd56
Finish reading data at eof
2022-03-09 22:36:34 +11:00
Andrew Murray
9db527a473
Finish once enough data has been read
2022-03-09 22:36:33 +11:00
Andrew Murray
11f1ba3540
Skip additional data if past end of row
2022-03-09 22:36:32 +11:00
Andrew Murray
0ace3fcd26
Added BMP RLE8 decoder
2022-03-09 22:35:48 +11:00
Andrew Murray
72b7ab54bd
pre-commit autoupdate --freeze
2022-03-04 16:42:24 +11:00
Andrew Murray
ff723e45ab
Ensure that pixel data offset does not ignore palette
2021-12-21 12:43:50 +11:00
Andrew Murray
98aa0f10ad
pre-commit autoupdate --freeze
2021-08-12 21:50:09 +10:00
Andrew Murray
0de3beaeaf
Removed DPI rounding when BMP loading
2021-05-07 20:50:18 +10:00
Alexander
1ff61bcaa6
use offset for all binary input functions instead of slicing
2020-12-30 19:10:50 +11:00
Alexander
3757b8c748
remove extra i8 calls where input is proved bytes[] or int
2020-12-30 19:04:11 +11:00
Andrew Murray
518b783c64
Removed OSError in favour of DecompressionBombError
2020-10-12 19:32:48 +11:00
Hugo van Kemenade
e0eec1eb56
Merge branch 'master' into rm-3.5
2020-09-01 20:16:46 +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