GithubHelp home page GithubHelp logo

quantum5 / win2xcur Goto Github PK

View Code? Open in Web Editor NEW
139.0 4.0 7.0 37 KB

win2xcur is a tool that converts cursors from Windows format (*.cur, *.ani) to Xcursor format. It also contains x2wincur which does the opposite.

Python 100.00%
windows cursor cursor-theme x11-cursor x11 ani-cursor xcursor-format converts-cursors cur-files

win2xcur's Introduction

win2xcur and x2wincur Build Status PyPI PyPI - Format PyPI - Python Version

win2xcur is a tool that converts cursors from Windows format (*.cur, *.ani) to Xcursor format. This allows Windows cursor themes to be used on Linux, for example.

win2xcur is more than a simple image conversion tool. It preserves the cursor hotspot and animation delay, and has an optional mode to add shadows that replicates Windows's cursor shadow effect.

x2wincur is a tool that does the opposite: it converts cursors in the Xcursor format to Windows format (*.cur, *.ani), allowing to use your favourite Linux cursor themes on Windows.

Installation

To install the latest stable version:

pip install win2xcur

To install from GitHub:

pip install -e git+https://github.com/quantum5/win2xcur.git

Usage: win2xcur

For example, if you want to convert the sample cursor to Linux format:

mkdir output/
win2xcur sample/crosshair.cur -o output/

-s can be specified to enable shadows. Multiple cursors files can be specified on the command line. For example, to convert a directory of cursors with shadows enabled:

win2xcur input/*.{ani,cur} -o output/ 

For more information, run win2xcur --help.

Usage: x2wincur

For example, if you want to convert DMZ-White to Windows:

mkdir dmz-white/
x2wincur /usr/share/icons/DMZ-White/cursors/* -o dmz-white/

Troubleshooting

win2xcur and x2wincur should work out of the box on most systems. If you are using unconventional distros (e.g. Alpine) and are getting errors related to wand, please see the Wand documentation on installation.

win2xcur's People

Contributors

ful1e5 avatar quantum5 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

win2xcur's Issues

Cannot convert .ani file

Hello,

Thanks for providing win2xcur!

I've got problems trying to convert an .ani file (gzipped / attached) :

pen.ani.gz

$ win2xcur pen.ani
Error occurred while processing pen.ani:
Traceback (most recent call last):
File "/home/martymac/.local/lib/python3.7/site-packages/win2xcur/main/win2xcur.py", line 46, in process
cursor = open_blob(blob)
File "/home/martymac/.local/lib/python3.7/site-packages/win2xcur/parser/init.py", line 17, in open_blob
raise ValueError('Unsupported file format')
ValueError: Unsupported file format

Any hint ?

[Feature Request] Multisize Support

I have been using the library for a while now and have found it to be incredibly useful. However, when using win2xcur, the library does not handle bigger cursors gracefully.
image

Only support 128px
image

For example, the program will only output the input image at its original size, but we often want the program to be automatically compatible with other sizes smaller than that, with simple downsampling.

multisized cursors
image

It would be incredibly helpful if the library could automatically downsample these bigger images to create smaller cursor types. This feature would not only improve the user experience but also provide more flexibility in customizing the mouse cursor appearance.

miku.ani File Format is Unsupported

Whenever I try converting this specific .ani file, I end up getting an error.

$ win2xcur input/miku.ani -o output/
Error occurred while processing input/miku.ani:
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 46, in process
    cursor = open_blob(blob)
  File "/home/user/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 17, in open_blob
    raise ValueError('Unsupported file format')
ValueError: Unsupported file format

The provided link is the Miku chan cursor set, created by RyanKun and released to the Public Domain.
The .ani file used for this error is Miku Cursor 2.ani
http://www.rw-designer.com/cursor-set/miku-chan
Miku Cursor 2.ani

Possible Bug: Can not convert entirety of Thane Techline Curors

I am trying to use win2xcur under Python 3.9 on Alpine Linux Edge and it fails to convert this entire set, which I know to be valid (ish) since I've been using it on Windows since about 2001.

https://download.cnet.com/Techline-Cursor-Pack/3000-2317_4-10062532.html

Error Dump:

/win2xcur -s ~/Downloads/thane-techline/*.* -o ~/
Error occurred while processing /home/alpine/Downloads/thane-techline/arrow.cur:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/alt.cur:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/busy.ani:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 41, in __init__
    self.frames = self._parse(self.RIFF_HEADER.size)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 91, in _parse
    frames.append(CURParser(self.blob[offset:offset + size]).frames[0])
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/forbbiden.cur:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/handwri.cur:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/help.cur:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/link.cur:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/move.cur:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/precision.cur:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/res-diag1.ani:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 41, in __init__
    self.frames = self._parse(self.RIFF_HEADER.size)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 91, in _parse
    frames.append(CURParser(self.blob[offset:offset + size]).frames[0])
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/res-diag2.ani:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 41, in __init__
    self.frames = self._parse(self.RIFF_HEADER.size)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 91, in _parse
    frames.append(CURParser(self.blob[offset:offset + size]).frames[0])
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/res-horiz.ani:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 41, in __init__
    self.frames = self._parse(self.RIFF_HEADER.size)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 91, in _parse
    frames.append(CURParser(self.blob[offset:offset + size]).frames[0])
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/text.cur:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/res-vert.ani:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 41, in __init__
    self.frames = self._parse(self.RIFF_HEADER.size)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 91, in _parse
    frames.append(CURParser(self.blob[offset:offset + size]).frames[0])
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458
Error occurred while processing /home/alpine/Downloads/thane-techline/working.ani:
Traceback (most recent call last):
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/main/win2xcur.py", line 43, in process
    cursor = open_blob(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/__init__.py", line 16, in open_blob
    return parser(blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 41, in __init__
    self.frames = self._parse(self.RIFF_HEADER.size)
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/ani.py", line 91, in _parse
    frames.append(CURParser(self.blob[offset:offset + size]).frames[0])
  File "/home/alpine/.local/lib/python3.9/site-packages/win2xcur/parser/cur.py", line 22, in __init__
    self._image = Image(blob=blob, format='cur')
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9142, in __init__
    self.read(blob=blob)
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/image.py", line 9815, in read
    self.raise_exception()
  File "/home/alpine/.local/lib/python3.9/site-packages/wand/resource.py", line 222, in raise_exception
    raise e
wand.exceptions.MissingDelegateError: NoDecodeDelegateForThisImageFormat `CUR' @ error/blob.c/BlobToImage/458

No way to specify output size for x2wincur?

I’m trying to convert some X11 cursors to Windows ones, but x2wincur gives me cursors bigger than what I’m expecting—I need standard-sized 24x24 cursors, not 32x32 ones. Is there a way to specify the exact size I want to get?

image

x2wincur not respecting transparency

X Cursor before conversion:
image
Windows Cursor after conversion:
image
Files (Includes extension-less X cursor and .ico):
arrow.zip

No idea what could have caused this. Maybe some sort of overcompensation of color-to-alpha for cursors with black as the background for legacy support or something? I have no idea about the history of .ico or how this program looks under the hood. Just speculation.

-s flag results in failure with ImageMagick 7

~ $ win2xcur Bibata-Modern-Ice-Windows/*.{ani,cur} -s -o output/
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/win2xcur", line 8, in <module>
    sys.exit(main())
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/win2xcur/main/win2xcur.py", line 58, in main
    pool.map(process, args.files)
  File "/data/data/com.termux/files/usr/lib/python3.10/multiprocessing/pool.py", line 364, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/data/data/com.termux/files/usr/lib/python3.10/multiprocessing/pool.py", line 771, in get
    raise self._value
  File "/data/data/com.termux/files/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/data/data/com.termux/files/usr/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar
    return list(map(*args))
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/win2xcur/main/win2xcur.py", line 50, in process
    shadow.apply_to_frames(cursor.frames, color=args.shadow_color, radius=args.shadow_radius,
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/win2xcur/shadow.py", line 39, in apply_to_frames
    cursor.image = apply_to_image(cursor.image, color=color, radius=radius,
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/win2xcur/shadow.py", line 23, in apply_to_image
    shadow.composite(opacity, operator='copy_opacity')
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/wand/image.py", line 1098, in wrapped
    result = function(self, *args, **kwargs)
  File "/data/data/com.termux/files/usr/lib/python3.10/site-packages/wand/image.py", line 3906, in composite
    op = COMPOSITE_OPERATORS.index(operator)
ValueError: tuple.index(x): x not in tuple

I experienced this error in both Arch and Termux. I read this which prompted me to install ImageMagick 6 rather than 7, and afterwards the script functioned correctly.

Not a big deal, but I don't see it documented anywhere that the script explicitly requires ImageMagick version 6. You should, in my opinion, at least add a warning to the readme for average joes such as myself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.