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
ImageUtil Copyright © 2025 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
--grid COLOR SIZE LABEL      Draw grid in color, every SIZE pixels, numbers if LABEL is non-zero (font size)
--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 #AARRGGBB 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 #AARRGGBB IN with OUT
--resize WIDTH HEIGHT        Resize image to width * height
--rotate N                   Rotate image N° clockwise
--text X Y BGCOLOR FGCOLOR FONT SIZE TEXT  Draw TEXT at X,Y, in COLORs, given FONT SIZE                                           TEXT can be a short string, or @FILENAME
--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

Comments are closed.

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.

Mentions

  • All my little software tools, things that don't belong on the Software Gallery. BasicSS: Basic Games in Scheme. Bookmarklets: Little scripts to run in your…