Coder Social home page Coder Social logo

aseicoexport's Introduction

Aseprite Ico Import & Export

Screen Capture

This an Aseprite script to export anis, curs and icos in 32 bit RGBA format, i.e., with translucency. It also has some import capability.

Aseprite can load and save icos, but the files are unreadable by other graphics editors, and do not support alpha even when they should.

Export is limited to to the size 256 by 256 pixels. Image dimensions are rounded to the next greatest power of two (8, 16, 32, 64, 128, 256). The file is formatted as 32 bit RGBA regardless of the sprite's color mode (grayscale, indexed or RGB). Each frame is stored as a separate entry in the same file.

Import is limited to 8 bit indexed with 256 color palette; 24 bit RGB with 1 bit alpha; and 32 bit RGBA. The opened sprite is always in RGB color mode, regardless of the file format. Files containing compressed png data are not supported. This script does not import Aseprite generated files.

To read more about the format, see the Wikipedia entry and "The evolution of the ICO file format" by Raymond Chen.

This script was developed and tested in Aseprite version 1.3.7 on Windows 10.

Download

To download this script, click on the green Code button above, then select Download Zip. You can also click on the icoio.lua file. Beware that some browsers will append a .txt file format extension to script files on download. Aseprite will not recognize the script until this is removed and the original .lua extension is used. There can also be issues with copying and pasting. Be sure to click on the Raw file button. Do not copy the formatted code.

Installation

To install this script, open Aseprite. In the menu bar, go to File > Scripts > Open Scripts Folder. Move the Lua script(s) into the folder that opens. Return to Aseprite; go to File > Scripts > Rescan Scripts Folder. The script should now be listed under File > Scripts. Select icoio.lua to launch the dialog.

If an error message in Aseprite's console appears, check if the script folder is on a file path that includes characters beyond ASCII, such as 'é' (e acute) or 'ö' (o umlaut).

Usage

A hot key can be assigned to a script by going to Edit > Keyboard Shortcuts. The search input box in the top left of the shortcuts dialog can be used to locate the script by its file name.

Once open, holding down the Alt or Option key and pressing the underlined letter on a button will activate that button via keypress. For example, Alt+C will cancel the dialog.

Modification

If you would like to modify this script, Aseprite's scripting API documentation can be found here. If you use Visual Studio Code, I recommend the Lua Language Server extension along with an Aseprite type definition.

aseicoexport's People

Contributors

behreajj avatar

Stargazers

 avatar

Watchers

 avatar

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.