Release: lpctools - tools for manipulating pixel art animations and tile sets

Release: lpctools - tools for manipulating pixel art animations and tile sets


I would like to share the first version of a suite of command line tools for manipulating pixel art images. Check it out here:

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 spritesheets
  • lpctools colors: manipulates palettes, recolors images
    • lpctools 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 formats
    • lpctools colors create-mapping: create a mapping between several color palettes
    • lpctools 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 , 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 .

I welcome your feedback and suggestions!