ImageUtil

A command-line image processing tool with multiple filters. These are mainly for pixel-editing, fixing color palettes, and such, and not generally "user-friendly", but developer-friendly.

% java -jar ImageUtil.jar --help
Unknown option '--help'
ImageUtil Copyright © 2021 by Mark Damon Hughes. All Rights Reserved.
`https://mdhughes.tech/tools/imageutil/`
Usage: ImageUtil [OPTION]... [INFILE [OUTFILE]]
  INFILE: Filename of source image, if missing then default 256x256,
                             OUTFILE must be specified with --out.
  OPTIONS:
--in INFILE                  Set input filename.
--out OUTFILE                Set output filename.
--verbose                    Show verbose output
--autocrop                   Resize image to first non-transparent rows/cols
--clip X Y WIDTH HEIGHT      Clips a sub-image from the image
--debug                      Print to stdout all pixels as hex values
--mask                       Write INFILE.mask with "{x,y}" on first line,
                             then y lines of x chars: '.' or 'X' for alpha 0.5+
--negative IN OUT            Replace all colors  except IN with OUT
--outline COLOR              Outlines all non-transparent pixels with COLOR
--pad DIR WIDTH HEIGHT       Pads image to new canvas size width * height,
                             DIR=n,ne,e,se,s,sw,w,nw,c
--recolor IN OUT             Replace all colors  IN with OUT
--resize WIDTH HEIGHT        Resize image to width * height
--rotate N                   Rotate image N° clockwise
--transfer SFILE SX SY SW SH DX DY DW DH
                             Transfer a sprite S into canvas at D

% # Example: change a cyan-background bitmap sprite into transparent png & pad it to 96x96
% java -jar ImageUtil.jar bossa1.bmp bossa1.png --recolor "#ff002f2f" "#00000000" --pad c 96 96