mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-14 02:20:55 +03:00
Merge pull request #2340 from radarhere/import
Remove unnecessary import
This commit is contained in:
commit
51532c2c21
|
@ -38,7 +38,6 @@ import array
|
||||||
import struct
|
import struct
|
||||||
import io
|
import io
|
||||||
import warnings
|
import warnings
|
||||||
from struct import unpack_from
|
|
||||||
from PIL import Image, ImageFile, TiffImagePlugin, _binary
|
from PIL import Image, ImageFile, TiffImagePlugin, _binary
|
||||||
from PIL.JpegPresets import presets
|
from PIL.JpegPresets import presets
|
||||||
from PIL._util import isStringType
|
from PIL._util import isStringType
|
||||||
|
@ -493,7 +492,7 @@ def _getmp(self):
|
||||||
try:
|
try:
|
||||||
rawmpentries = mp[0xB002]
|
rawmpentries = mp[0xB002]
|
||||||
for entrynum in range(0, quant):
|
for entrynum in range(0, quant):
|
||||||
unpackedentry = unpack_from(
|
unpackedentry = struct.unpack_from(
|
||||||
'{}LLLHH'.format(endianness), rawmpentries, entrynum * 16)
|
'{}LLLHH'.format(endianness), rawmpentries, entrynum * 16)
|
||||||
labels = ('Attribute', 'Size', 'DataOffset', 'EntryNo1',
|
labels = ('Attribute', 'Size', 'DataOffset', 'EntryNo1',
|
||||||
'EntryNo2')
|
'EntryNo2')
|
||||||
|
|
|
@ -28,7 +28,6 @@ else:
|
||||||
|
|
||||||
|
|
||||||
# Input, le = little endian, be = big endian
|
# Input, le = little endian, be = big endian
|
||||||
# TODO: replace with more readable struct.unpack equivalent
|
|
||||||
def i16le(c, o=0):
|
def i16le(c, o=0):
|
||||||
"""
|
"""
|
||||||
Converts a 2-bytes (16 bits) string to an unsigned integer.
|
Converts a 2-bytes (16 bits) string to an unsigned integer.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user