mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-29 19:36:19 +03:00
Simplified imports
This commit is contained in:
parent
9a7bd0d10b
commit
78756cd17b
|
@ -12,7 +12,6 @@ Full text of the CC0 license:
|
||||||
import io
|
import io
|
||||||
import struct
|
import struct
|
||||||
from enum import IntEnum, IntFlag
|
from enum import IntEnum, IntFlag
|
||||||
from io import BytesIO
|
|
||||||
|
|
||||||
from . import Image, ImageFile
|
from . import Image, ImageFile
|
||||||
from ._binary import i32le as i32
|
from ._binary import i32le as i32
|
||||||
|
@ -286,7 +285,7 @@ class DdsImageFile(ImageFile.ImageFile):
|
||||||
if len(header_bytes) != 120:
|
if len(header_bytes) != 120:
|
||||||
msg = f"Incomplete header: {len(header_bytes)} bytes"
|
msg = f"Incomplete header: {len(header_bytes)} bytes"
|
||||||
raise OSError(msg)
|
raise OSError(msg)
|
||||||
header = BytesIO(header_bytes)
|
header = io.BytesIO(header_bytes)
|
||||||
|
|
||||||
flags_, height, width = struct.unpack("<3I", header.read(12))
|
flags_, height, width = struct.unpack("<3I", header.read(12))
|
||||||
flags = DDSD(flags_)
|
flags = DDSD(flags_)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user