mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Merge pull request #6552 from radarhere/constants
This commit is contained in:
commit
7158816bc8
|
@ -1155,7 +1155,7 @@ class TiffImageFile(ImageFile.ImageFile):
|
|||
|
||||
: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):
|
||||
"""
|
||||
|
@ -1330,7 +1330,7 @@ class TiffImageFile(ImageFile.ImageFile):
|
|||
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))
|
||||
|
@ -1471,8 +1471,8 @@ class TiffImageFile(ImageFile.ImageFile):
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user