Release: lpctools - tools for manipulating pixel art animations and tile sets
Hello,
I would like to share the first version of a suite of command line tools for manipulating pixel art images. Check it out here:
https://github.com/bluecarrot16/lpctools
These tools are designed to automate certain repetitive tasks, for example: breaking up, combinging, and re-arranging images in an animation spritesheet, or recoloring assets with various color palettes.
Currently, the following verbs are implemented:
lpctools arrange
: organizes animation frames into spritesheetslpctools arrange distribute
: takes small number of images and arranges them into full set of animations. This is the big one. Used for making things like hair, hats, or shields that are largely the same for many frames, but need to be slightly offset and/or masked to create the full set of animations. Similar to https://github.com/jrconway3/Universal-LPC-spritesheet/blob/master/Editi... but more flexible, and similar to https://github.com/basxto/lpc-shell-tools/blob/master/duplimap.sh but hopefully easier to uselpctools arrange repack
: re-arrange animation frames in a spritesheet; for example, convert from the stacked "universal" layout to a series of separate images, one for each animation; or re-arrange images like this https://opengameart.org/forumtopic/improving-lpc#comment-89424 to the universal layout, etc.lpctools arrange unpack
: takes a spritesheet and slices it up into many individual imageslpctools arrange pack
: takes many individual images and arranges into a spritesheet
lpctools colors
: manipulates palettes, recolors imageslpctools colors recolor
: re-color image(s) to one or more palette(s). Uses RGBA images and RGBA palettes. Very flexible in how you specify the palette (PNG image, GIMP GPL palette, JSON file); flexibly and intelligently arranges output images into folders.lpctools colors convert-palette
: convert color palettes between different formatslpctools colors create-mapping
: create a mapping between several color paletteslpctools colors convert-mapping
: convert a mapping between different formats
Why did I create these tools? True, many functions can be served by existing tools, and basically everything here can be done with ImageMagick. However, by writing a more specialized set of scripts, these specific tasks can be accomplished in a more straightforward and explicit manner, while still retaining tons of flexibility.
These were concieved mainly for generating and modifying sprites in the Liberated Pixel Cup style, but the tools are general enough that they should work for other types of images as well. I was heavily inspired by the discussion in this thread https://opengameart.org/forumtopic/improving-lpc , and thank the participants there for their suggestions.
Future additions:
- lpctools arrange nudge : apply offsets to each image in a spritesheet
- lpctools arrange cutout: apply a mask/make cutouts from image in a spritesheet
- lpctools arrange collapse: identify redundant frames in a spritesheet layout output as a set of unique images (opposite of lpctools arrange distribute)
- lpctools arrange layer: alpha composite several images
- lpctools color coerce: crush an image into the colors specified by a palette
- lpctools color audit: similar to coerce, but identifies pixels in an image that are not in the palette
- lpctools color recolor-index: recolor indexed PNGs to a color palette
- lpctools color collapse: takes several images which are recolors of one another, and generates a list of palettes from each one
- Various tools for editing tile atlases, as described here https://opengameart.org/forumtopic/curated-lpc-collection-project .
I welcome your feedback and suggestions!
Several updates:
Next up is `lpctools color coerce` and `lpctools color audit`!