Andrew Murray
f3c3e52797
Added type hints ( #8204 )
...
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
2024-07-05 11:55:23 -06:00
Andrew Murray
2d1fe7572f
Added type hints
2024-06-10 14:15:28 +10:00
Andrew Murray
6036d81d97
Added type hints
2024-05-04 20:51:54 +10:00
Andrew Murray
48b270590c
accept returns bool or str
2024-04-06 18:31:08 +02:00
Hugo van Kemenade
43b2f61e79
Add 'from __future__ import annotations' using Ruff/isort
2023-12-21 13:13:31 +02:00
Aarni Koskela
f47633a24a
Apply suggestions from code review
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-11-13 09:28:01 +02:00
Aarni Koskela
126bc44e9e
Fix up most noqas
...
Update Tests/bench_cffi_access.py
Co-authored-by: Alexander Karpinsky <homm86@gmail.com>
2023-11-12 13:47:52 +02:00
Aarni Koskela
9e615b6ad3
Add noqas for UP031
2023-11-06 12:43:14 +02:00
Andrew Murray
9979a822c7
Changed Image mode property to be read-only by default
2023-07-29 09:28:18 +10:00
Andrew Murray
546f6cbc27
Replaced absolute PIL import with relative import
2023-05-20 17:11:43 +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
Hugo van Kemenade
29960c6610
Merge pull request #6108 from radarhere/none
2022-03-10 17:36:13 +02:00
Andrew Murray
c27519960f
Check if self.im is not None
2022-03-03 22:10:19 +11:00
Andrew Murray
56324c300d
Simplify code by using _accept
2022-02-27 14:48:36 +11:00
Andrew Murray
fb7edfda68
Improved consistency of returning an image access object from load()
2022-02-02 11:49:31 +11:00
Andrew Murray
838c8efa25
Corrected file length in header
2021-11-20 14:17:42 +11:00
Andrew Murray
43f5a5f80b
Combined sizes and types into dictionary
2021-06-30 23:30:59 +10:00
Andrew Murray
8736a745f4
Removed _to_int
2021-06-29 21:08:26 +10:00
Andrew Murray
90ece137b0
Merge branch 'master' into master
2021-06-29 20:52:35 +10:00
Andrew Murray
f366330a74
Only open one BytesIO instance at a time
2021-06-29 20:50:36 +10:00
Andrew Murray
d07a085757
Simplified use of struct
2021-06-29 20:40:32 +10:00
Andrew Murray
f5558f42f4
Only getvalue() once per entry
2021-06-29 20:40:26 +10:00
Andrew Murray
8e60ca6106
Use bytes
2021-06-29 20:40:05 +10:00
Hugo van Kemenade
38d45d2848
flush if hasattr
...
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2021-06-28 17:48:06 +03:00
Andrew Murray
3795772187
Use python3
2021-05-08 12:37:06 +10:00
Andrew Murray
60da129d4b
Replaced register_open lambdas with _accept method for consistency
2021-04-03 21:51:28 +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
Alexander
3757b8c748
remove extra i8 calls where input is proved bytes[] or int
2020-12-30 19:04:11 +11:00
Andrew Murray
86ad435ee4
Merge branch 'master' into master
2020-12-30 13:05:35 +11:00
Andrew Murray
0ff800a525
Updated docstring
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-12-30 12:49:22 +11:00
Andrew Murray
d7245eae23
Capitalisation
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-11-01 14:07:31 +11:00
Andrew Murray
63e8420ef6
Removed docstring sentence
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-11-01 14:05:52 +11:00
Andrew Murray
b214c2d73e
Changed wording
2020-11-01 14:02:15 +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
Andrew Murray
1e8d418f42
Fixed ICNS file pointer saving
2020-06-28 17:24:27 +10:00
nulano
a324f4a466
add version to features info block
2020-06-21 18:58:39 +10:00
Andrew Murray
9e9e136f54
Do not save two temporary files for the same size
2020-04-07 21:42:23 +10:00
Andrew Murray
84b7e268f9
Merged HEADER_SIZE into HEADERSIZE
2020-04-07 21:18:37 +10:00
Andrew Murray
65b735d9cb
Marked to_int() as private
2020-04-07 21:13:46 +10:00
Andrew Murray
a618e2ca1c
Fixed big-endian saving
2020-04-07 21:13:40 +10:00
Jingle
10669b17b9
Merge pull request #1 from radarhere/icns
...
Save in ICNS format to support all operating systems
2020-04-07 14:10:51 +08:00
panjing
cc1e78ccdf
Remove unused packages
2020-04-07 13:59:27 +08:00
Andrew Murray
ea98bb6163
Restored append_images
2020-04-04 15:02:19 +11:00
Andrew Murray
4500acb274
Lint fixes
2020-04-04 15:02:02 +11:00
panjing
b685c18e95
Save in icns format to support all operating systems.
2020-04-04 11:22:11 +08:00
Andrew Murray
dd8b0de666
Close excusively opened images
2020-02-18 20:49:05 +11:00
Andrew Murray
6e130e9f63
Close file pointer in __main__
2020-02-17 22:12:46 +11:00
Andrew Murray
bd7242228b
Fixed saving bug in __main__
2020-02-17 22:11:24 +11:00
Hugo
3a34081db5
Simplify temporary directory cleanup
...
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
2019-10-08 17:25:55 +03:00