Skip to content

Commit

Permalink
Refactor and format with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jun 10, 2019
1 parent b9b7514 commit 169455f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/PIL/Image.py
Original file line number Diff line number Diff line change
Expand Up @@ -3184,7 +3184,7 @@ def get_ifd(self, tag):
if tag == 0xA005: # interop
self._ifds[tag] = self._get_ifd_dict(tag)
elif tag == 0x927C: # makernote
from . import TiffImagePlugin
from .TiffImagePlugin import ImageFileDirectory_v2

if self._data[0x927C][:8] == b"FUJIFILM":
exif_data = self._data[0x927C]
Expand All @@ -3197,7 +3197,7 @@ def get_ifd(self, tag):
"<HHL4s", ifd_data[i * 12 + 2 : (i + 1) * 12 + 2]
)
try:
unit_size, handler = TiffImagePlugin.ImageFileDirectory_v2._load_dispatch[
unit_size, handler = ImageFileDirectory_v2._load_dispatch[
typ
]
except KeyError:
Expand All @@ -3221,7 +3221,7 @@ def get_ifd(self, tag):
continue

makernote[ifd_tag] = handler(
TiffImagePlugin.ImageFileDirectory_v2(), data, False
ImageFileDirectory_v2(), data, False
)
self._ifds[0x927C] = dict(self._fixup_dict(makernote))
elif self._data.get(0x010F) == "Nintendo":
Expand All @@ -3248,13 +3248,11 @@ def get_ifd(self, tag):

self.fp.read(12)
parallax = self.fp.read(4)
handler = TiffImagePlugin.ImageFileDirectory_v2._load_dispatch[
handler = ImageFileDirectory_v2._load_dispatch[
TiffTags.FLOAT
][
1
]
][1]
camerainfo["Parallax"] = handler(
TiffImagePlugin.ImageFileDirectory_v2(), parallax, False
ImageFileDirectory_v2(), parallax, False
)

self.fp.read(4)
Expand Down

0 comments on commit 169455f

Please sign in to comment.