Code cleanup

This commit is contained in:
Joel Collins 2020-10-14 14:56:29 +00:00
parent 2bfb988460
commit 994e83dbeb
46 changed files with 261 additions and 318 deletions

View file

@ -2,9 +2,9 @@ import struct
import sys
from . import _webp
from ._common import *
from ._common import get_exif_seg, read_exif_from_file, split_into_segments
from ._exceptions import InvalidImageDataError
from ._exif import *
from ._exif import ExifIFD, ImageIFD, TAGS, TYPES
LITTLE_ENDIAN = b"\x49\x49"
@ -109,6 +109,8 @@ class _ExifReader(object):
else:
raise InvalidImageDataError("Given file is neither JPEG nor TIFF.")
self.endian_mark = None
def get_ifd_dict(self, pointer, ifd_name, read_unknown=False):
ifd_dict = {}
tag_count = struct.unpack(