-
Notifications
You must be signed in to change notification settings - Fork 3
Image transformation commands
This page is work in progress!
Contents:
Note: all of the commands below produce an image output which, by default, is named after the source image followed by a tag.
The output file can be manually set to any file by using --imgoutput=path, which can also be used to chain two or more of the following commands when --chainoutput is enabled.
Command: recolorize[=method]
Description:
Creates a copy of the source image (that relies on the default scheme) and adapts it to a custom scheme.
Arguments:
-
method: defines what color should be used in case some properties have more than one color (e.g.whitespace=FFFFFF,FF0000).
It can be eitherfirst(default),lastorrandom;
Properties needed:
-
source: image to recolorize; -
colors: custom scheme that should be applied; -
lib(optional): library files used.
Example:
to do
Command: standardize
Description:
Creates a copy of the source image (that relies on a custom scheme) and adapts it to the default scheme.
Properties needed:
-
source: image to recolorize; -
colors: custom scheme used by the source image; -
lib(optional): library files used.
Example:
to do
Command: compact[=size]
Description:
Creates a copy of the source image where pixels are one next to another, except for line breaks, without any whitespace between them.
Arguments:
-
size: size (in pixels) of the output image. If not specified, the program will pick a proper size that minimizes whitespaces.
The argument is defined viaw?h?, where bothwandhare optional (in case one is missing, it will be calculated the same way as before)
For example:w10h5= 10 x 5,w10= 10 x auto,h5= auto x 5);
Properties needed:
-
source: image to compact; -
colors: scheme used, only needed to detect whitespaces;
Example:
to do
Command: decompact
Description:
Creates a copy of the source image with one statement per line, including empty lines that separate blocks in order to improve readability.
Properties needed:
-
source: image to decompact; -
colors: scheme used;
Command: standardecompact
Description:
Runs standardize and decompact.
Properties needed:
-
source: image to standardize and decompact; -
colors: custom scheme used by the source image; -
lib(optional): library files used.
Command: colorswap=<swaps>
Description:
Replaces certain colors with others.
Arguments:
-
swaps: a list of pairsOLD:NEW, separated by a comma, whereOLDis the color to be replaced andNEWis the color to set, both as hexadecimal values. For example:FF0000:FFFF00,00FF00:0000FFreplaces red with yellow and green with blue.
Properties needed:
-
source: image to affect.
Command: -mask=<mask path>
Description:
Applies a 'shape' mask to the source image without altering its content.
Arguments:
-
mask path: path to an image that generates the shape mask. A mask image has a transparent background with solid pixels where the actual shape is.
Note: the amount of pixels of the source image has to match the amount of solid pixels of the mask image.
Properties needed:
-
source: image to mask.