Skip to content

Commit

Permalink
Merge pull request #6552 from radarhere/constants
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Aug 31, 2022
2 parents 0b5c150 + b3dcf17 commit 7158816
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PIL/TiffImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ def getxmp(self):
:returns: XMP tags in a dictionary.
"""
return self._getxmp(self.tag_v2[700]) if 700 in self.tag_v2 else {}
return self._getxmp(self.tag_v2[XMP]) if XMP in self.tag_v2 else {}

def get_photoshop_blocks(self):
"""
Expand Down Expand Up @@ -1330,7 +1330,7 @@ def _setup(self):
logger.debug(f"- photometric_interpretation: {photo}")
logger.debug(f"- planar_configuration: {self._planar_configuration}")
logger.debug(f"- fill_order: {fillorder}")
logger.debug(f"- YCbCr subsampling: {self.tag.get(530)}")
logger.debug(f"- YCbCr subsampling: {self.tag.get(YCBCRSUBSAMPLING)}")

# size
xsize = int(self.tag_v2.get(IMAGEWIDTH))
Expand Down Expand Up @@ -1471,8 +1471,8 @@ def _setup(self):
else:
# tiled image
offsets = self.tag_v2[TILEOFFSETS]
w = self.tag_v2.get(322)
h = self.tag_v2.get(323)
w = self.tag_v2.get(TILEWIDTH)
h = self.tag_v2.get(TILELENGTH)

for offset in offsets:
if x + w > xsize:
Expand Down

0 comments on commit 7158816

Please sign in to comment.