mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Added ImageSourceData to TAGS_V2
This commit is contained in:
parent
3cd1e12974
commit
aa9ecac032
|
@ -668,6 +668,11 @@ class TestFileLibTiff(LibTiffTestCase):
|
|||
assert reloaded.tag_v2[530] == (1, 1)
|
||||
assert reloaded.tag_v2[532] == (0, 255, 128, 255, 128, 255)
|
||||
|
||||
def test_save_imagesourcedata(self, tmp_path):
|
||||
outfile = str(tmp_path / "temp.tif")
|
||||
with Image.open("Tests/images/tiff_adobe_deflate.tif") as im:
|
||||
im.save(outfile)
|
||||
|
||||
def test_crashing_metadata(self, tmp_path):
|
||||
# issue 1597
|
||||
with Image.open("Tests/images/rdf.tif") as im:
|
||||
|
|
|
@ -72,10 +72,18 @@ data to populate those resources.
|
|||
PpmImagePlugin might hold onto the last data read for a pixel value in case the
|
||||
pixel value has not been finished yet. However, that data was not being cleared
|
||||
afterwards, meaning that infinite data could be available to fill any image
|
||||
size.
|
||||
size. This has been present since Pillow 9.2.0.
|
||||
|
||||
That data is now cleared after use.
|
||||
|
||||
Saving TIFF tag ImageSourceData
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
If Pillow incorrectly saved the TIFF tag ImageSourceData as ASCII instead of
|
||||
UNDEFINED, a segmentation fault was triggered.
|
||||
|
||||
The correct tag type will now be used by default instead.
|
||||
|
||||
Other Changes
|
||||
=============
|
||||
|
||||
|
|
|
@ -195,6 +195,7 @@ TAGS_V2 = {
|
|||
34675: ("ICCProfile", UNDEFINED, 1),
|
||||
34853: ("GPSInfoIFD", LONG, 1),
|
||||
36864: ("ExifVersion", UNDEFINED, 1),
|
||||
37724: ("ImageSourceData", UNDEFINED, 1),
|
||||
40965: ("InteroperabilityIFD", LONG, 1),
|
||||
41730: ("CFAPattern", UNDEFINED, 1),
|
||||
# MPInfo
|
||||
|
|
Loading…
Reference in New Issue
Block a user