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
Andrew Murray
4ae694cd7b
Merge pull request #4712 from cool-RR/2020-06-12-raise-from
...
Fix exception causes all over the codebase
2020-06-28 15:22:05 +10:00
Andrew Murray
6c2d575f9b
Simplified passing of data to _accept
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-06-23 18:09:12 +10:00
Andrew Murray
9b6fdd719f
Call _accept instead of duplicating code
2020-06-23 17:41:13 +10:00
Ram Rachum
2f0d430807
Fix exception causes all over the codebase
2020-06-21 13:21:25 +03:00
Andrew Murray
4580b156b7
Raise an error if BMP file size is too large when saving
2019-12-21 08:37:40 +11:00
Andrew Murray
ce62dca326
Aligned comments correctly
2019-12-21 08:15:48 +11: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
Andrew Murray
ca3e210313
Simplified definition of values
2019-06-12 02:12:57 +10:00
Hugo
53a7e35004
Format with Black
2019-06-10 18:22:46 +03:00