Merge pull request #4594 from rodrigob/patch-1

This commit is contained in:
Hugo van Kemenade 2020-05-01 19:43:51 +03:00 committed by GitHub
commit bd0f7b7116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -261,9 +261,9 @@ class TestPyDecoder:
with Image.open(out) as reloaded:
reloaded_exif = reloaded.getexif()
assert reloaded_exif[258] == 8
assert 40960 not in exif
assert 40960 not in reloaded_exif
assert reloaded_exif[40963] == 455
assert exif[11] == "Pillow test"
assert reloaded_exif[11] == "Pillow test"
with Image.open("Tests/images/no-dpi-in-exif.jpg") as im: # Big endian
exif = im.getexif()
@ -281,9 +281,9 @@ class TestPyDecoder:
with Image.open(out) as reloaded:
reloaded_exif = reloaded.getexif()
assert reloaded_exif[258] == 8
assert 40960 not in exif
assert 34665 not in reloaded_exif
assert reloaded_exif[40963] == 455
assert exif[305] == "Pillow test"
assert reloaded_exif[305] == "Pillow test"
@skip_unless_feature("webp")
@skip_unless_feature("webp_anim")
@ -302,7 +302,7 @@ class TestPyDecoder:
reloaded_exif = reloaded.getexif()
assert reloaded_exif[258] == 8
assert reloaded_exif[40963] == 455
assert exif[305] == "Pillow test"
assert reloaded_exif[305] == "Pillow test"
im.save(out, exif=exif)
check_exif()

View File

@ -3281,7 +3281,7 @@ class Exif(MutableMapping):
self._data.update(ifd)
self._ifds[0x8769] = ifd
def tobytes(self, offset=0):
def tobytes(self, offset=8):
from . import TiffImagePlugin
if self.endian == "<":