mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-13 01:50:48 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
f4fde29070
commit
95b8061e68
|
@ -19,7 +19,7 @@ import warnings
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from math import ceil, log
|
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 i16le as i16
|
||||||
from ._binary import i32le as i32
|
from ._binary import i32le as i32
|
||||||
from ._binary import o8
|
from ._binary import o8
|
||||||
|
@ -37,10 +37,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")
|
||||||
|
|
||||||
|
@ -119,6 +116,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):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user