Commit Graph

362 Commits

Author SHA1 Message Date
Andrew Murray
8afb7ddb4e Added type hints 2024-08-15 08:08:43 +10:00
Aleksandr Karpinskii
0d79a38e77 Add missing TIFF CMYK;16B reader 2024-08-11 15:14:29 +04:00
Andrew Murray
accfaf1c09 Added type hints 2024-07-30 20:20:09 +10:00
Andrew Murray
6420f73613 Added type hints 2024-07-29 23:46:07 +10:00
Andrew Murray
c85eb0cae5 Added type hints 2024-07-28 12:53:02 +10:00
Andrew Murray
046285ac5d Added type hints 2024-07-26 16:42:28 +10:00
Andrew Murray
f624460321 Added type hints 2024-07-20 13:14:18 +10:00
Andrew Murray
5bae934317 Added type hints 2024-07-12 21:16:56 +10:00
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
5ce3f55111 Merge branch 'main' into exififd 2024-06-25 21:53:17 +10:00
Hugo van Kemenade
bbf879641d
Merge pull request #7997 from radarhere/rgbx 2024-06-25 05:28:50 -06:00
Hugo van Kemenade
e62f47950e
Merge pull request #7948 from radarhere/iptc 2024-06-25 05:26:53 -06:00
Andrew Murray
7ab3aee7bc
Merge branch 'main' into xmp 2024-06-19 09:06:10 +10:00
Andrew Murray
be73b13ad3 Added type hints 2024-06-12 21:15:55 +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
56fa3c658a Added type hints 2024-06-09 07:12:22 +10:00
Andrew Murray
ac7967cfc0 Do not preserve EXIFIFD tag by default 2024-06-07 13:25:56 +10:00
Andrew Murray
b3c534cc9a Added type hints 2024-06-05 08:29:28 +10:00
Andrew Murray
0f1a0fc501 Improved consistency of XMP handling 2024-05-20 23:11:50 +10:00
Andrew Murray
8a3a72e51d Added type hints 2024-05-18 16:06:50 +10:00
Andrew Murray
a8d154877d Added type hints 2024-05-13 18:47:51 +10:00
Andrew Murray
58ee112a9a
Merge branch 'main' into type_hint 2024-05-08 18:04:02 +10:00
mrKazzila
74063feadc chore: add f-string formatting 2024-05-04 19:21:49 +03:00
Andrew Murray
6036d81d97 Added type hints 2024-05-04 20:51:54 +10:00
Hugo van Kemenade
02915c778e
Merge pull request #7996 from radarhere/tiff_px 2024-04-22 17:10:44 +03:00
Andrew Murray
2e1d2b2029 Updated deprecation message 2024-04-22 19:15:38 +10:00
Andrew Murray
023d017da0 Deprecate libtiff < 4 2024-04-22 18:26:20 +10:00
Andrew Murray
bb2411dd01 Support reading P mode TIFF images with padding 2024-04-22 08:11:45 +10:00
Andrew Murray
98a0515494 Read images as RGB, rather than RGBX 2024-04-22 08:05:59 +10:00
Andrew Murray
48b270590c accept returns bool or str 2024-04-06 18:31:08 +02:00
Andrew Murray
2245df0ac3 Only preserve IPTC_NAA_CHUNK tag if type is BYTE or UNDEFINED 2024-04-06 20:59:06 +11:00
Hugo van Kemenade
da13358245
Merge pull request #7883 from radarhere/tiff
Raise ValueError if seeking to greater than offset-sized integer in TIFF
2024-04-01 08:46:05 +03:00
Andrew Murray
3004c46683 Block saving TIFF tag OSUBFILETYPE using libtiff 2024-03-22 23:43:55 +11:00
Andrew Murray
21801f3a45 Raise ValueError if seeking to greater than offset-sized integer 2024-03-16 13:33:04 +11:00
Andrew Murray
904b8e549c Allow writing IFDRational to UNDEFINED tag 2024-02-28 21:07:15 +11:00
Andrew Murray
d02a778efd
Removed no cover pragmas
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-02-10 21:57:59 +11:00
Andrew Murray
19a6edeecc Added type hints 2024-02-10 19:50:45 +11:00
Andrew Murray
99760f4c59
Merge branch 'main' into tiff 2024-01-01 13:41:17 +11:00
Andrew Murray
f7ec665bf1 Support setting ROWSPERSTRIP tag 2023-12-29 23:00:14 +11:00
Andrew Murray
f6bcf4e1ae Use IMAGEWIDTH and IMAGELENGTH when calculating strip size 2023-12-29 14:15:40 +11:00
Hugo van Kemenade
43b2f61e79 Add 'from __future__ import annotations' using Ruff/isort 2023-12-21 13:13:31 +02:00
Aarni Koskela
0c705692ea Remove old commented-out code 2023-11-06 21:21:07 +02:00
Andrew Murray
7394e5083d
Merge branch 'main' into tiff 2023-10-06 11:40:05 +11:00
Hugo van Kemenade
507b7d519a Fix LOG011 avoid pre-formatting log messages 2023-09-25 16:45:38 +03:00
Andrew Murray
616ed35e74 Support reading 8-bit YCbCr TIFF images 2023-09-21 20:53:23 +10:00
Andrew Murray
1217b13b9e Handle tag_v2 in TiffImagePlugin 2023-09-11 19:02:17 +10:00
Andrew Murray
ea953c0514 When TIFF applies orientation on load, delete tag from getexif() 2023-09-08 15:05:36 +10:00
Andrew Murray
9979a822c7 Changed Image mode property to be read-only by default 2023-07-29 09:28:18 +10:00
Hugo van Kemenade
0ac3677b56
Merge pull request #7199 from radarhere/tiff_close 2023-06-30 09:27:26 +03:00
Andrew Murray
8bbd4ada9b Merge branch 'main' into exif_transpose 2023-06-14 09:57:25 +10:00
Hugo van Kemenade
ae921956ba
Merge pull request #7078 from radarhere/long8 2023-06-13 19:48:55 +03:00
Andrew Murray
e45da2ae17 Do not close provided file handles with libtiff 2023-06-05 11:07:09 +10:00
Andrew Murray
a4986ba986 Support reading signed 8-bit TIFF images 2023-05-04 07:54:30 +10:00
Andrew Murray
fe8599c5d6 Use ExifTags 2023-04-16 14:04:39 +10:00
Andrew Murray
dd15f15d08 Added further field sizes 2023-04-10 09:06:20 +10:00
Andrew Murray
5080d35816 Allow libtiff_support_custom_tags to be missing 2023-03-17 11:27:58 +11:00
Andrew Murray
6932562974 Added __int__ to IFDRational for Python >= 3.11 2023-03-09 22:21:37 +11:00
Frédéric Carron
2299490082 Close the file pointer copy (_fp) in the libtiff encoder if it is still open. 2023-03-03 11:41:37 +01:00
Andrew Murray
fcc59a4001 Use existing variable names from ImageFile 2023-02-25 16:31:26 +02:00
Aarni Koskela
8e18415cc5 Clarify variable names in TiffImagePlugin
Co-authored-by: Yay295 <Yay295@users.noreply.github.com>
2023-02-24 10:09:14 +02:00
Andrew Murray
ad0e9dbaaf Fixed writing int as UNDEFINED tag 2023-02-14 10:52:32 +11: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
Andrew Murray
e48aead015 Allow writing IFDRational to BYTE tag 2023-01-13 21:02:42 +11:00
Hugo van Kemenade
2df4865e42 Use 'key in mydict' instead of 'key in mydict.keys()' 2023-01-08 13:47:46 +02:00
Hugo van Kemenade
2ae55ccbda Improve exception traceback readability 2022-12-30 00:07:52 +02:00
Hugo van Kemenade
1ba19b1105
Merge pull request #6800 from radarhere/int_ascii
Resolves https://github.com/python-pillow/Pillow/issues/6799
2022-12-29 23:36:33 +02:00
Andrew Murray
6da4169f37 Fixed writing int as ASCII tag 2022-12-13 22:40:55 +11:00
Andrew Murray
c2a42655e1 Allow get_child_images to access JPEG thumbnails 2022-12-06 19:30:53 +11:00
Andrew Murray
70cc8a5741 Fixed writing int as BYTE tag 2022-11-15 09:06:41 +11:00
Hugo van Kemenade
799a6a0105 Fix linting 2022-10-29 12:06:30 +03:00
Eric Soroos
13f2c5ae14 Prevent DOS with large SAMPLESPERPIXEL in Tiff IFD
A large value in the SAMPLESPERPIXEL tag could lead to a memory and
runtime DOS in TiffImagePlugin.py when setting up the context for
image decoding.
2022-10-29 12:06:18 +03:00
Andrew Murray
0fd110864a Changed mode to I;16 2022-10-05 21:15:45 +11:00
Jay-Jay Aslan
802a1430fe
added support for 16 bit integer tiffs 2022-10-05 11:03:51 +02:00
Andrew Murray
beb7b4d0f6 Added reading of TIFF child images 2022-09-10 22:50:54 +10:00
Hugo van Kemenade
7158816bc8
Merge pull request #6552 from radarhere/constants 2022-08-31 18:06:00 +03:00
Andrew Murray
b3dcf17886 Use constants 2022-08-31 20:09:05 +10:00
Andrew Murray
3459120732 Fixed writing bytes as ASCII tag 2022-08-11 20:46:58 +10:00
Andrew Murray
2b14d83549 Added strip_size as TIFF encoder argument 2022-08-01 21:41:17 +10:00
Hugo van Kemenade
55d3c07e1d
Merge pull request #6232 from radarhere/colormap 2022-06-01 23:12:13 +03:00
Andrew Murray
b1885779a9 Once exif data is parsed, do not reload unless it changes 2022-05-27 07:54:54 +10:00
Hugo van Kemenade
33f00c9ca8
Merge pull request #6231 from radarhere/bmp_compression
Ignore compression value from BMP info dictionary when saving as TIFF
2022-05-20 16:18:15 +03:00
Hugo van Kemenade
2c58c3ee11
Merge pull request #6213 from radarhere/fp 2022-05-19 18:52:55 +03:00
Andrew Murray
4dc1a55f65 Adjust BITSPERSAMPLE to match SAMPLESPERPIXEL 2022-05-04 22:11:10 +10:00
Andrew Murray
bcded33cee
Merge pull request #6195 from hugovk/cleanup
Cleanup: various
2022-04-26 18:51:44 +10:00
Andrew Murray
1e3fdb3055 Pad COLORMAP to 768 items 2022-04-21 11:29:17 +10:00
Andrew Murray
2c5e5049db Ignore compression value from BMP info dictionary 2022-04-21 07:58:12 +10:00
Andrew Murray
4e075adcc5 Merged _close_fp into close and __exit__ 2022-04-17 12:13:58 +10:00
Andrew Murray
2ae52552f7 Renamed __fp to _fp 2022-04-17 12:13:58 +10:00
Andrew Murray
72a59d298a Variable in function should be snake_case 2022-04-15 19:00:23 +10:00
Hugo van Kemenade
d3c9a6504e Variable in function should be snake_case 2022-04-10 23:55:16 +03:00
Hugo van Kemenade
855c1a12da Use self for first method parameter 2022-04-10 23:39:54 +03:00
Hugo van Kemenade
830da5c41e Rewrite dict creation as dict literal for better performance 2022-04-10 23:39:54 +03:00
Hugo van Kemenade
ee85e387ba Remove redundant parentheses 2022-04-10 23:39:54 +03:00
Hugo van Kemenade
1bc0e1bb9d
Merge pull request #5973 from radarhere/planar_configuration 2022-03-27 18:52:44 +03:00
Andrew Murray
ebdb47e693 Support reading I;16R TIFF images 2022-03-20 13:34:50 +11:00
Hugo van Kemenade
515957b2ac
Merge pull request #6097 from radarhere/bigtiff 2022-03-11 23:05:41 +02:00
Hugo van Kemenade
180c89f755
Merge pull request #6092 from radarhere/accept 2022-03-05 23:10:08 +02:00
Andrew Murray
72b7ab54bd pre-commit autoupdate --freeze 2022-03-04 16:42:24 +11:00
Andrew Murray
fc7319318e Added BigTIFF reading 2022-03-01 09:23:12 +11:00