mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +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.
|
: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):
|
def get_photoshop_blocks(self):
|
||||||
"""
|
"""
|
||||||
|
@ -1330,7 +1330,7 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
logger.debug(f"- photometric_interpretation: {photo}")
|
logger.debug(f"- photometric_interpretation: {photo}")
|
||||||
logger.debug(f"- planar_configuration: {self._planar_configuration}")
|
logger.debug(f"- planar_configuration: {self._planar_configuration}")
|
||||||
logger.debug(f"- fill_order: {fillorder}")
|
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
|
# size
|
||||||
xsize = int(self.tag_v2.get(IMAGEWIDTH))
|
xsize = int(self.tag_v2.get(IMAGEWIDTH))
|
||||||
|
@ -1471,8 +1471,8 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
else:
|
else:
|
||||||
# tiled image
|
# tiled image
|
||||||
offsets = self.tag_v2[TILEOFFSETS]
|
offsets = self.tag_v2[TILEOFFSETS]
|
||||||
w = self.tag_v2.get(322)
|
w = self.tag_v2.get(TILEWIDTH)
|
||||||
h = self.tag_v2.get(323)
|
h = self.tag_v2.get(TILELENGTH)
|
||||||
|
|
||||||
for offset in offsets:
|
for offset in offsets:
|
||||||
if x + w > xsize:
|
if x + w > xsize:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user