This commit is contained in:
jlwoolf 2022-09-21 18:47:32 -06:00
commit d722d0dedc

View File

@ -35,10 +35,7 @@ def _save(im, fp, filename):
"sizes", "sizes",
[(16, 16), (24, 24), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)], [(16, 16), (24, 24), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)],
) )
hotspots = im.encoderinfo.get( hotspots = im.encoderinfo.get("hotspots", [(0, 0) for i in range(len(sizes))])
"hotspots",
[(0, 0) for i in range(len(sizes))]
)
if len(hotspots) != len(sizes): if len(hotspots) != len(sizes):
raise ValueError("Number of hotspots must be equal to number of cursor sizes") raise ValueError("Number of hotspots must be equal to number of cursor sizes")
@ -117,6 +114,7 @@ def _accept(prefix):
## ##
# Image plugin for Windows Cursor files. # Image plugin for Windows Cursor files.
class CurFile(IcoImagePlugin.IcoFile): class CurFile(IcoImagePlugin.IcoFile):
def __init__(self, buf): def __init__(self, buf):
""" """