mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-29 14:34:13 +03:00
Use constants
This commit is contained in:
parent
196210bc80
commit
b3dcf17886
|
@ -1153,7 +1153,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):
|
||||||
"""
|
"""
|
||||||
|
@ -1328,7 +1328,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))
|
||||||
|
@ -1469,8 +1469,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