Commit Graph

258 Commits

Author SHA1 Message Date
Andrew Murray
a4986ba986 Support reading signed 8-bit TIFF images 2023-05-04 07:54:30 +10:00
Andrew Murray
90c226c69a
Merge branch 'main' into tiff 2023-03-12 22:30:15 +11:00
Andrew Murray
9ed8ca1494 Removed "del im" 2023-03-03 10:28:36 +02:00
Aarni Koskela
43128ce716 Fix up pytest.warns lambda: uses 2023-02-23 16:06:40 +02: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
412f5a5233 Moved test_wrong_bits_per_sample to test_file_libtiff.py 2023-01-29 17:33:51 +11:00
Andrew Murray
510de501ea Moved test_get_child_images to test_file_libtiff.py 2023-01-29 17:33:46 +11:00
Hugo van Kemenade
799a6a0105 Fix linting 2022-10-29 12:06:30 +03:00
Hugo van Kemenade
00b25fd3ac Hide UserWarning in logs
Tests/test_file_tiff.py::TestFileTiff::test_oom[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]
  PIL/TiffImagePlugin.py:850: UserWarning: Corrupt EXIF data.  Expecting to read 12 bytes but only got 6. 
    warnings.warn(str(msg))

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2022-10-29 12:06:27 +03:00
Eric Soroos
05b175ef88 Tighter test case 2022-10-29 12:06:24 +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
Mark Mayo
69baeccf2e some pylint warnings
Fixed some pylint issues
2022-10-13 15:20:11 +13:00
Andrew Murray
c259ac492f Parametrized tests 2022-10-03 16:57:42 +11:00
Andrew Murray
ed016f8f5a
Parametrized test 2022-09-11 09:20:45 +10:00
Andrew Murray
beb7b4d0f6 Added reading of TIFF child images 2022-09-10 22:50:54 +10: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
4e52d06e6c Added test 2022-05-05 17:57:08 +10:00
Andrew Murray
2c5e5049db Ignore compression value from BMP info dictionary 2022-04-21 07:58:12 +10:00
Andrew Murray
e62449f94c Added DeferredError to _fp 2022-04-17 12:14:53 +10:00
Hugo van Kemenade
9951de08c0 [Test] argument name should be snake_case 2022-04-11 15:29:01 +03:00
Hugo van Kemenade
a715bf2d6f [Test] function name should be snake_case 2022-04-11 15:29:01 +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
Andrew Murray
fc7319318e Added BigTIFF reading 2022-03-01 09:23:12 +11:00
Andrew Murray
dae1f691c2 Updated checks that no warnings were raised 2022-02-21 13:49:01 +11:00
mergify[bot]
89768e3d57
Merge pull request #6042 from radarhere/tiff_bits
Clarify code and comments
2022-02-10 21:20:22 +00:00
Hugo van Kemenade
f5fab326fa
Merge pull request #6030 from radarhere/photoshopblocks
Added get_photoshop_blocks() to parse Photoshop TIFF tag
2022-02-10 09:40:17 +02:00
Andrew Murray
2ae70f144f Added get_photoshop_blocks() to parse Photoshop tag 2022-02-10 12:00:23 +11:00
Andrew Murray
e098481279 Combined width and height into size 2022-02-10 11:02:13 +11:00
Mikhail Iurkov
2bbf5f0981
Lint 2022-02-09 16:53:27 +03:00
Mikhail Iurkov
bb5a090f60
Drop excess values in BITSPERSAMPLE 2022-02-09 16:40:43 +03:00
Andrew Murray
67944cedc7 Always save with contiguous planar configuration 2022-01-18 19:40:57 +11:00
Andrew Murray
7370a0b1cf Remove consecutive duplicates that only differ by their offset 2022-01-01 14:54:23 +11:00
Andrew Murray
3f3828040b
Merge branch 'master' into tiff_exif 2021-09-07 06:33:37 +10:00
Hugo van Kemenade
d773fcd23d Filter out UserWarning: Truncated File Read 2021-08-24 11:33:43 +03:00
Andrew Murray
9bf7dae03d Allow saving L mode TIFF with PhotometricInterpretation 0 2021-08-06 23:50:52 +10:00
Andrew Murray
2dab52b8a8 Allow saving 1 mode TIFF with PhotometricInterpretation 0 2021-08-05 23:27:08 +10:00
Andrew Murray
9707d33ed9 Allow "exif" to also accept bytestring 2021-07-04 13:32:41 +10:00
Andrew Murray
c0f619384c Added "exif" keyword argument to save Image.Exif instance 2021-07-04 12:33:55 +10:00
Andrew Murray
0aa8bd00e7 Added warning if defusedxml is not found 2021-06-30 11:29:13 +10:00
Andrew Murray
d9d811ff21 Replaced xml.etree.ElementTree with defusedxml.ElementTree 2021-06-30 11:28:44 +10:00
Hugo van Kemenade
b5c4b9afe0
Merge pull request #5455 from radarhere/xmp 2021-06-28 18:43:04 +03:00
Hugo van Kemenade
9f28e4be26
Merge pull request #5412 from radarhere/ifdrational_eq_float 2021-06-28 18:33:46 +03:00
Hugo van Kemenade
6d94376d1f
Merge pull request #5416 from radarhere/tiff_exif
Allow getexif() to access TIFF tag_v2 data
2021-06-28 18:12:17 +03:00
Andrew Murray
ae3bdf87f0 Added getxmp() for TIFF 2021-06-12 12:17:38 +10:00
Hugo van Kemenade
1ac7bd9f87
Merge pull request #5473 from radarhere/tiff_seek
Do not allow TIFF to seek to a past frame
2021-06-05 18:49:34 +03:00
Andrew Murray
7bfaffd5fa Simplified tests now that casting to float is not needed 2021-05-10 09:36:57 +10:00
Andrew Murray
9ac888262a Do not allow TIFF to seek to a past frame 2021-05-08 00:25:47 +10:00