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

One thought on “ImageUtil”

  1. 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…

Comments are closed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out 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…

Mentions

  • Mark writes