diff --git a/src/PIL/CurImagePlugin.py b/src/PIL/CurImagePlugin.py index f7b73ff6b..041ba22eb 100644 --- a/src/PIL/CurImagePlugin.py +++ b/src/PIL/CurImagePlugin.py @@ -19,7 +19,7 @@ import warnings from io import BytesIO from math import ceil, log -from . import BmpImagePlugin, Image, ImageFile, PngImagePlugin, IcoImagePlugin +from . import BmpImagePlugin, IcoImagePlugin, Image, ImageFile, PngImagePlugin from ._binary import i16le as i16 from ._binary import i32le as i32 from ._binary import o8 @@ -37,10 +37,7 @@ def _save(im, fp, filename): "sizes", [(16, 16), (24, 24), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)], ) - hotspots = im.encoderinfo.get( - "hotspots", - [(0, 0) for i in range(len(sizes))] - ) + hotspots = im.encoderinfo.get("hotspots", [(0, 0) for i in range(len(sizes))]) if len(hotspots) != len(sizes): raise ValueError("Number of hotspots must be equal to number of cursor sizes") @@ -119,6 +116,7 @@ def _accept(prefix): ## # Image plugin for Windows Cursor files. + class CurFile(IcoImagePlugin.IcoFile): def __init__(self, buf): """