Skip to content

Image transformation commands

Giorgio Garofalo edited this page Jun 21, 2022 · 16 revisions

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.

Recolorize

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 either first (default), last or random;

Properties needed:

  • source: image to recolorize;
  • colors: custom scheme that should be applied;
  • lib (optional): library files used.

Example:
to do

Standardize

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

Compact

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 via w?h?, where both w and h are 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

Decompact

Command: -decompact

Standardize + decompact

Command: -standardecompact

Description: Runs -standardize and -decompact.

Color swap

Command: -colorswap=<swaps>

Mask

Command: -mask=<mask path>

Clone this wiki locally