← 🏠

Image Command Line

Image Command Line is a tool for manipulating images from the command line, similar ImageMagick. It aims to be smaller and easier to use than ImageMagick.

Click here to download the zip file containing binaries for the following platforms:

For the following examples, we will use this as our input, in.jpg:

Example 1: Check dimensions of image

$ icl in.jpg
Loaded 'in.jpg' (336 by 252).

Example 2: Convert to png

$ icl in.jpg -o in.png
Loaded 'in.jpg' (336 by 252).
Saved as 'in.png' (336 by 252).

Example 3: Various effects

$ icl in.jpg blur
$ icl in.jpg desaturate
$ icl in.jpg sharpen2
$ icl in.jpg negate

Example 4: Drawing stuff

$ icl 336x252 fill black -o pic.jpg
$ icl pic.jpg line 0 0 336 251 white -o pic.jpg
$ icl pic.jpg circle 150 100 100 white -o pic.jpg
$ icl pic.jpg text 10 10 Hello red "Times New Roman" 30 -o pic.jpg
$ icl pic.jpg ascii 10 50 World green 4 -o pic.jpg

Example 5: Steganography

$ icl in.jpg hide pic.jpg -o secret_message.png
$ icl secret_message.png unhide -o message.jpg

This tool has many more features, like resizing, scaling, cropping, blitting, rotating, flipping, etc... See usage for full list.

Usage

USAGE:
	icl [input] [command] [args] [-o output]

WHERE:
	-[input] is a PNG, BMP, or JPEG image
	-[command] is a single command. See below for list of commands.
	-[args] is the arguments for the command
	-[output] is where to save the file. If not specified, the default
	 is 'out.png'

COMMANDS:
	crop [x] [y] [width] [height]
	fill [color]
	interpolate [image|color] [alpha]
	blend [image] [alpha] [beta]
	blur [radius (default=10)]
	desaturate
	sharpen [amount (default=3.0)]
	sharpen2 [amount (default=3.0)] [blur radius (default=2)]
	saturate [amount (default=3.0)]
	negate
	brighten [amount (default=1.25)]
	lazy_resize [width] [height]
	lazy_scale [ratio]
	resize [width] [height]
	scale [ratio]
	threshold [amount (0-255)]
	average
	text [x] [y] [text] [color] [face (default=Tahoma)] [size (default=12)] [transparent (default=false)]
	blit [image] [x] [y] [use_alpha (default=true)]
	rect [x] [y] [width] [height] [color] [filled (default=false)]
	line [x1] [y1] [x2] [y2] [color]
	circle [x] [y] [radius] [color] [filled (default=false)]
	rotate_left
	rotate_right
	flip [x-axis (true or false)] [y-axis (true or false)]
	pivot
	cinema => do cinema effect (sharpen, slightly desaturate, and more shadow)
	find_exact [image] => find coordinates of image in input
	find_fuzzy [image] => quickly find coordinates of image in input
	ascii [x] [y] [text] [color] [scale (default=2)]
	ascii_table [scale (default=2)]
	dither [image] [bits (default=2)]
	hide [image] [bits (default=2)] => hide image within this image (steganography)
	unhide [bits (default=2)] => reveal image hidden within this image, if any

NOTES:
	Input can be in the following format to create a new image:
	  [width (default=1)]x[height (default=1)]

	Colors can be specified in one of the following formats:
	  RGBA hex: #rrggbbaa
	  RGB hex: #rrggbb
	  RGBA hex, 16-bit: #rgba
	  RGB hex, 16-bit: #rgb
	  RGBA tuple: rgba(r,g,b,a)
	  RGB tuple: rgb(r,g,b)
	  HSLA tuple: hsl(h,s,l,a)
	  HSL tuple: hsl(h,s,l)
	  Constant: white, black, red, green, blue, orange, purple, yellow

	For the tuples, RGB must be [0,255], alpha must be [0,1],
	hue must be [0,360), saturation [0,1], and lightness [0,1].
	If alpha is not specified, it is assumed to be 0xff (255).

How is this better than ImageMagick?

It's less typing, smaller, and easier to use.