mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Do not unintentionally load TIFF format at first
This commit is contained in:
parent
43bb03539e
commit
c5d1b15824
|
@ -41,7 +41,7 @@ import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from . import Image, ImageFile, TiffImagePlugin
|
from . import Image, ImageFile
|
||||||
from ._binary import i16be as i16
|
from ._binary import i16be as i16
|
||||||
from ._binary import i32be as i32
|
from ._binary import i32be as i32
|
||||||
from ._binary import o8
|
from ._binary import o8
|
||||||
|
@ -524,6 +524,8 @@ def _getmp(self):
|
||||||
head = file_contents.read(8)
|
head = file_contents.read(8)
|
||||||
endianness = ">" if head[:4] == b"\x4d\x4d\x00\x2a" else "<"
|
endianness = ">" if head[:4] == b"\x4d\x4d\x00\x2a" else "<"
|
||||||
# process dictionary
|
# process dictionary
|
||||||
|
from . import TiffImagePlugin
|
||||||
|
|
||||||
try:
|
try:
|
||||||
info = TiffImagePlugin.ImageFileDirectory_v2(head)
|
info = TiffImagePlugin.ImageFileDirectory_v2(head)
|
||||||
file_contents.seek(info.next)
|
file_contents.seek(info.next)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user