diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index 40165f101..b64c9e9bc 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -474,7 +474,7 @@ class ImageFileDirectory(collections.MutableMapping): for i in range(self._unpack("H", fp.read(2))[0]): tag, typ, count, data = self._unpack("HHL4s", fp.read(12)) - if Image.DEBUG: + if DEBUG: tagname = TAGS.get(tag, TagInfo()).name typname = TYPES.get(typ, "unknown") print("tag: %s (%d) - type: %s (%d)" % @@ -490,7 +490,7 @@ class ImageFileDirectory(collections.MutableMapping): if size > 4: here = fp.tell() offset, = self._unpack("L", data) - if Image.DEBUG: + if DEBUG: print("Tag Location: %s - Data Location: %s" % (here, offset), end=" ") fp.seek(offset) diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 13823d28f..33d77f558 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -3,11 +3,8 @@ from helper import unittest, PillowTestCase, hopper, py3 from ctypes import c_float import io -<<<<<<< HEAD import logging -======= import itertools ->>>>>>> Restore legacy TIFF API. import os from PIL import Image, TiffImagePlugin