Simplified imports

This commit is contained in:
Andrew Murray 2022-10-08 23:06:39 +11:00 committed by REDxEYE
parent 9a7bd0d10b
commit 78756cd17b

View File

@ -12,7 +12,6 @@ Full text of the CC0 license:
import io
import struct
from enum import IntEnum, IntFlag
from io import BytesIO
from . import Image, ImageFile
from ._binary import i32le as i32
@ -286,7 +285,7 @@ class DdsImageFile(ImageFile.ImageFile):
if len(header_bytes) != 120:
msg = f"Incomplete header: {len(header_bytes)} bytes"
raise OSError(msg)
header = BytesIO(header_bytes)
header = io.BytesIO(header_bytes)
flags_, height, width = struct.unpack("<3I", header.read(12))
flags = DDSD(flags_)