mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Corrected passing TIFF_LONG to libtiff
This commit is contained in:
parent
aa9ecac032
commit
b1b0353d17
|
@ -668,11 +668,16 @@ 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):
|
||||
def test_exif_ifd(self, tmp_path):
|
||||
outfile = str(tmp_path / "temp.tif")
|
||||
with Image.open("Tests/images/tiff_adobe_deflate.tif") as im:
|
||||
assert im.tag_v2[34665] == 125456
|
||||
im.save(outfile)
|
||||
|
||||
with Image.open(outfile) as reloaded:
|
||||
if Image.core.libtiff_support_custom_tags:
|
||||
assert reloaded.tag_v2[34665] == 125456
|
||||
|
||||
def test_crashing_metadata(self, tmp_path):
|
||||
# issue 1597
|
||||
with Image.open("Tests/images/rdf.tif") as im:
|
||||
|
|
|
@ -904,7 +904,7 @@ PyImaging_LibTiffEncoderNew(PyObject *self, PyObject *args) {
|
|||
&encoder->state, (ttag_t)key_int, (UINT16)PyLong_AsLong(value));
|
||||
} else if (type == TIFF_LONG) {
|
||||
status = ImagingLibTiffSetField(
|
||||
&encoder->state, (ttag_t)key_int, (UINT32)PyLong_AsLong(value));
|
||||
&encoder->state, (ttag_t)key_int, PyLong_AsLongLong(value));
|
||||
} else if (type == TIFF_SSHORT) {
|
||||
status = ImagingLibTiffSetField(
|
||||
&encoder->state, (ttag_t)key_int, (INT16)PyLong_AsLong(value));
|
||||
|
|
Loading…
Reference in New Issue
Block a user