Ico, Cur, Ani Export

Hi all,

I wrote a script to export ico, cur and ani files.

Files are exported as 32-bit RGBA color, regardless of sprite color mode. Image sizes are promoted to the nearest greater power of 2. The maximum size is 256x256. For curs, the hotspot is set in the dialog by percentage, with (0, 0) being the top left corner and (100, 100) being the bottom right corner of the image.

There is limited import ability for 8-bit indexed, 24-bit RGB and 32-bit RGBA color. icos and curs have to use bitmaps, not pngs. anis have to contain icos or curs. The sprite palette is set to the first 256 used colors from bottom-left to top-right.

Aseprite has built-in support for icos, but they’ve not been working for me.

No matter what color bit depth is chosen, icos and curs contain a 1-bit alpha mask (opaque or transparent). From what I’ve tested, exports work with cursor shadows; the script writes any color greater than zero as opaque. The above image shows the interface for Windows 10; Enable pointer shadow is in the bottom-left of the window.

Above is a compatibility test with Irfanview (for ani) and GIMP (for ico).