add MIT license
add README
initial commit
This is a simple script to take pixel data in Aseprite and convert it to the format PICO-8 uses when storing graphics in the clipboard. If you have a selected region, it will copy that, otherwise it copies the entire image.
To download, right-click here and select Save link as....
Proceed to save it in Aseprite's scripts folder; I recommend renaming
the file to something like CopyP8GFX.lua.
(If you don't know where that is, in Aseprite,
open the File menu, then Scripts > Open Scripts Folder.)
While you don't have to read the code, I encourage it nonetheless.
The script requires that the sprite is in Indexed mode with a palette of exactly 16 colors. You'll probably want to use the PICO-8 palette for this, but you can change the colors to match your palette's setup if needed. The script also requires that the copied region is no wider or taller than 256 pixels.
To use the script, open Aseprite and go to File > Scripts. If you don't see the script, select the Rescan Scripts Folder option. Once you see the script, select it. Whatever image is open will be encoded; if you have an active selection, only that region will be encoded. The encoded string will be presented in a text box with further instructions.