mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Updated MakerNote IFD capitalization
This commit is contained in:
parent
a7338f8ce7
commit
b99a00f44f
|
@ -352,7 +352,7 @@ class Interop(IntEnum):
|
||||||
class IFD(IntEnum):
|
class IFD(IntEnum):
|
||||||
Exif = 34665
|
Exif = 34665
|
||||||
GPSInfo = 34853
|
GPSInfo = 34853
|
||||||
Makernote = 37500
|
MakerNote = 37500
|
||||||
Interop = 40965
|
Interop = 40965
|
||||||
IFD1 = -1
|
IFD1 = -1
|
||||||
|
|
||||||
|
|
|
@ -3884,7 +3884,7 @@ class Exif(_ExifBase):
|
||||||
gps_ifd = exif.get_ifd(ExifTags.IFD.GPSInfo)
|
gps_ifd = exif.get_ifd(ExifTags.IFD.GPSInfo)
|
||||||
print(gps_ifd)
|
print(gps_ifd)
|
||||||
|
|
||||||
Other IFDs include ``ExifTags.IFD.Exif``, ``ExifTags.IFD.Makernote``,
|
Other IFDs include ``ExifTags.IFD.Exif``, ``ExifTags.IFD.MakerNote``,
|
||||||
``ExifTags.IFD.Interop`` and ``ExifTags.IFD.IFD1``.
|
``ExifTags.IFD.Interop`` and ``ExifTags.IFD.IFD1``.
|
||||||
|
|
||||||
:py:mod:`~PIL.ExifTags` also has enum classes to provide names for data::
|
:py:mod:`~PIL.ExifTags` also has enum classes to provide names for data::
|
||||||
|
@ -4047,11 +4047,11 @@ class Exif(_ExifBase):
|
||||||
ifd = self._get_ifd_dict(offset, tag)
|
ifd = self._get_ifd_dict(offset, tag)
|
||||||
if ifd is not None:
|
if ifd is not None:
|
||||||
self._ifds[tag] = ifd
|
self._ifds[tag] = ifd
|
||||||
elif tag in [ExifTags.IFD.Interop, ExifTags.IFD.Makernote]:
|
elif tag in [ExifTags.IFD.Interop, ExifTags.IFD.MakerNote]:
|
||||||
if ExifTags.IFD.Exif not in self._ifds:
|
if ExifTags.IFD.Exif not in self._ifds:
|
||||||
self.get_ifd(ExifTags.IFD.Exif)
|
self.get_ifd(ExifTags.IFD.Exif)
|
||||||
tag_data = self._ifds[ExifTags.IFD.Exif][tag]
|
tag_data = self._ifds[ExifTags.IFD.Exif][tag]
|
||||||
if tag == ExifTags.IFD.Makernote:
|
if tag == ExifTags.IFD.MakerNote:
|
||||||
from .TiffImagePlugin import ImageFileDirectory_v2
|
from .TiffImagePlugin import ImageFileDirectory_v2
|
||||||
|
|
||||||
if tag_data[:8] == b"FUJIFILM":
|
if tag_data[:8] == b"FUJIFILM":
|
||||||
|
@ -4138,7 +4138,7 @@ class Exif(_ExifBase):
|
||||||
ifd = {
|
ifd = {
|
||||||
k: v
|
k: v
|
||||||
for (k, v) in ifd.items()
|
for (k, v) in ifd.items()
|
||||||
if k not in (ExifTags.IFD.Interop, ExifTags.IFD.Makernote)
|
if k not in (ExifTags.IFD.Interop, ExifTags.IFD.MakerNote)
|
||||||
}
|
}
|
||||||
return ifd
|
return ifd
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user