mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
Use endswith
This commit is contained in:
parent
167ed55d8b
commit
7cee64ad1b
|
@ -1573,10 +1573,8 @@ class TiffImageFile(ImageFile.ImageFile):
|
||||||
# byte order.
|
# byte order.
|
||||||
elif rawmode == "I;16":
|
elif rawmode == "I;16":
|
||||||
rawmode = "I;16N"
|
rawmode = "I;16N"
|
||||||
elif ";16B" in rawmode:
|
elif rawmode.endswith(";16B") or rawmode.endswith(";16L"):
|
||||||
rawmode = rawmode.replace(";16B", ";16N")
|
rawmode = rawmode[:-1] + "N"
|
||||||
elif ";16L" in rawmode:
|
|
||||||
rawmode = rawmode.replace(";16L", ";16N")
|
|
||||||
|
|
||||||
# Offset in the tile tuple is 0, we go from 0,0 to
|
# Offset in the tile tuple is 0, we go from 0,0 to
|
||||||
# w,h, and we only do this once -- eds
|
# w,h, and we only do this once -- eds
|
||||||
|
|
Loading…
Reference in New Issue
Block a user