-
Notifications
You must be signed in to change notification settings - Fork 0
usage
rasberry edited this page Mar 5, 2026
·
24 revisions
Usage: ImageFunctions [options] [function name] [-- function options]
Options:
-h / --help Show help / full help (provide a function name to show only that help instead)
-i / --image (file) Load this image as a layer. Supports images with multiple layers
-# / --size (width) (height) Set the default size in pixels when no images are loaded
-f / --format (name) Save any output files as specified (engine supported) format
-x / --max-threads (number) Restrict parallel processing to a given number of threads (defaults to # of cores)
-e / --engine (name) Select (a registered) image engine (default first available)
-v / --verbose (category) Show messages from this and more severe categories (defaults to Message)
-o / --output (name) Output file name
-lf / --formats List engine supported image formats
-ln / --namespace (name) List registered items in given namespace (specify 'all' to list everything)
-- Pass all remaining options to the function
Log Categories:
1. Debug
2. Info
3. Message
4. Warning
5. Error
99. Disabled
Function AllColors:
Creates an image with every possible 24-bit color ordered by chosen pattern.
-p (Pattern) Sort by Pattern (default BitOrder)
-s (Space) Sort by color space components (instead of pattern)
-so (n,...) Change priority order of components (default 1,2,3,4)
-ps Use multi-threaded sort function instead of regular sort
-o (number[%]) Color Offset to use (should be between 0% and 100%
-on (number) Absolute Color Offset to use
-l / --legacy Use original (legacy) algorithm
Available Patterns
1. BitOrder Numeric order
2. AERT AERT brightness
3. HSP HSP color model brightness
4. WCAG2 WCAG2 relative luminance
5. SMPTE240M Luminance SMPTE 240M (1999)
6. Luminance709 Luminance BT.709
7. Luminance601 Luminance BT.601
8. Luminance2020 Luminance BT.2020
9. Spiral16 Spiral blocks of 16 x 16
10. Spiral4kBuckets Spiral blocks of 4k x 4k using buckets
11. Spiral4k Spiral blocks of 4k x 4k
12. Squares4k Square blocks of 256 x 256
Available Spaces
1. RGB
2. HSV
3. HSL
4. HSI
5. YCbCr
6. CieXyz
7. Cmyk
Function AreaSmoother:
Blends adjacent areas of flat color together by sampling the nearest two colors to the area
-t (number) Number of times to run fit function (default 7)
-r Draw the gradient ratio as a grayscale image instead of modifying the original colors
--sampler (name) Use given (registered) sampler (defaults to nearest neighbor)
--metric (name) Use a (registered) distance metric (defaults to euclidean)
Function AreaSmoother2:
Blends adjacent areas of flat color together by blending horizontal and vertical gradients
-H Horizontal only
-V Vertical only
Function AutoWhiteBalance:
Balances the image by stretching the color channels separately. The process 'trims' the color histogram removing sections of low color use at the top and bottom of the range then stretching the remaining colors to fill the space
-p (number[%]) Threshold for discarding infrequently used colors (default 0.05%)
-b (number) Number of buckets to use for histogram (default 256)
-a Also stretch alpha channel
Function ComplexPlot:
Fills an image with the values of a given polynomial in the complex plane
-e (text) Math expression evaluated at each pixel
-rx (start,end) Horizontal range of window (default -2.0,2.0)
-ry (start,end) Vertical range of window (default -2.0,2.0)
-f (number) Apply flattening to magnitude with given strength (default 2.0)
-go (number) Gradient offset 0.0 to 1.0 (default 0.0)
-gs (number) Scale gradient by specified multiple (default 2.0)
-mo Use only magnitude for coloring
-po Use only phase for coloring
--gradient (name) Use a (registered) gradient
Function Deform:
Warps an image using a mapping function
-cx (x,y) Coordinates of center in pixels
-cp (x,y) Coordinates of center by proportion (default 50% 50%)
-e (number) (e) Power Exponent (default 2.0)
-m (Mode) Choose mode (default Polynomial)
--sampler (name) Use given (registered) sampler (defaults to nearest neighbor)
Available Modes
1. Polynomial x^e/w, y^e/h
2. Inverted n/x, n/y; n = (x^e + y^e)
Function Derivatives:
Computes the color change rate - similar to edge detection
-g Enable grayscale output
-a Calculate absolute value difference
Function DistanceColoring:
Colors pixels with the smallest color index determined by distance to the nearest same color
-p (PlacementKind) Placement type (defaults to random)
-rs (number) Random Int32 seed value (defaults to system picked)
--gradient (name) Use a (registered) gradient
Available Placements:
0. None
1. Random
2. Sequential
3. Spiral
Function Encrypt:
Encrypt or Decrypts the pixels of an image
Note: (text) is escaped using RegEx syntax so that passing binary data is possible. Also see -raw option
-d Enable decryption (default is to encrypt
-p (text) Password used to encrypt / decrypt image
-pi Ask for the password on the command prompt (instead of -p)
-raw Treat password text as a raw string (shell escaping still applies)
-iv (text) Initialization Vector - must be exactly 16 bytes
-test Print out any specified (text) inputs as hex and exit
Function FibSquares:
Divides the canvas into squares and remainders consecutively which creates a Fibonacci-like sequence
-m (DrawModeKind) Choose drawing mode (default Plain)
-s Use spiral sequence ordering instead or random
-b Also draw borders around each square
-rs (number) Set the random number seed to produce consistent imges
-w (SweepKind) Tweak the processing to avoid getting stuck at a dead-end (default Resize)
Available Modes:
0. Nothing Don't draw boxes - combine with '-b' to draw only borders
1. Plain Draw solid colored boxes
2. Gradient Draw boxes as linear gradients
3. Drag Draw gradients between consecutive boxes by tweening
Available Sweep types:
0. Nothing Don't tweak the image; may run into dead-ends
1. Split Split the image by the Phi ratio into two sections
2. Resize Resize the image to match the Phi ratio
Function FloodFill:
Fills area(s) of color with another color
-c (color) Fill color (default white)
-p (x,y) Pick starting coordinate (can be specified multiple times)
-i Replace pixels with ones taken the second layer
-r (color) Treat all pixels of given color as starting points
-s (number[%]) How similar pixels should be to match range: [0.0,1.0] (default 100%)
-f (Fill) Use specified fill method (default BreadthFirst)
-m (Map) Use specified mapping method (default Coordinate)
-nl Create a new layer instead of replacing original(s)
--metric (name) Use a (registered) distance metric (defaults to euclidean)
Fill Type:
0. BreadthFirst
1. DepthFirst
Map Type:
1. Horizontal
2. Vertical
3. Random
4. Coordinate
Function Gradient:
Draws a Gradient
-g (GradientKind) Gradient Shape (default Linear)
-d (DirectionKind) Gradient Direction (default Forward)
-ps (x,y) Staring point coordinates
-pe (x,y) Ending point coordinates
-pps (x,y) Staring point proportional(%) coordinates
-ppe (x,y) Ending point proportional(%) coordinates
-s (number) Gradient speed multiplier (default 1.0)
-o (number) Gradient color offset (default 0.0)
-r Restrict gradient to area defined by the coordinates
--gradient (name) Use a (registered) gradient (defaults to 'FullRGB')
--metric (name) Use a (registered) distance metric (defaults to euclidean)
Available Gradient Shapes:
0. Linear
1. Radial
2. Square
3. Conical
4. Bilinear
Available Gradient Directions:
0. Forward
1. Backward
2. ForBack
3. BackFor
Function GraphNet:
Creates a plot of a boolean-like network with a random starring state.
-b (number) Number of states (default 2)
-n (number) Number of nodes in the network (defaults to width of image)
-c (number) Connections per node (default 3)
-p (number[%]) Chance of inserting a perturbation (default 0)
-rs (number) Random Int32 seed value (defaults to system picked)
Function ImgDiff:
Highlights differences between two images.
By default differences are highlighted based on distance ranging from highlight color to white
-o (number[%]) Overlay highlight color at given opacity
-i Match identical pixels instead of differences
-x Output original pixels instead of highlighting them
-c (color) Change highlight color (default is magenta)
-nl Create a third layer instead of replacing two with one
--metric (name) Use a (registered) distance metric (defaults to euclidean)
Function Life:
Runs the Game of Life simulation and captures the state in various ways - The given starting image is turned into black/white
-i (number) maximum number of iterations (default 10000)
-nl render the output on a new layer instead of replacing the original one
-ch run one simulation per channel (RGB)
-th (number[%]) threshold for picking white/black (default 50%)
-nh disable recording history trails
-b (number[%]) brighten history pixels by amount
-s Stop when population stabilizes for 10 iterations
-w Let world wrap around at the edges
Function Line:
Draws a line or sequence of lines
-m (LineKind) Method used to draw the line
-p (x,y) Specify a point. Can be specified multiple times
-pp (x,y) Specify a proportional point (0.1,20%)
-c (color) Color for the line (default black)
Available methods:
0. RunLengthSlice Run-length slice algorithm
1. Bresenham Bresenham line algorithm
2. DDA Digital Differential Analyzer method
3. XiaolinWu Xiaolin Wu Anti-Aliased line algorithm
4. WuBlackBook Wu's algorithm from Graphics Programming Black Book
Function Maze:
Draws one of several mazes
-m (Maze) Choose a maze (default prims)
-cc (color) Change cell color (default black)
-wc (color) Change wall color (default white)
-rs (number) Random Int32 seed value (defaults to system picked)
-sq (s,s,...) Growing Tree cell picking sequence (default 'N')
-sr Randomly pick between sequence options
Available Mazes:
1. Eller Eller's algorithm
2. Prims Prim's (Jarník's) algorithm
3. Kruskal Kruskal's algorithm 🐢
4. BinaryTree Binary tree maze algorithm
5. GrowingTree Growing tree maze algorithm
6. Automata Cellular automata maze
7. Spiral Experimental maze using a spiral layout
8. ReverseDelete Reverse delete algorithm 🐢
9. SideWinder Sidewinder maze algorithm
10. Division Recursize division algorithm
Available Sequence Options: (Only for Growing Tree)
1. Newest (N)ewest
2. Oldest (O)ldest
3. Middle (M)iddle
4. Random (R)Random
Function PixelateDetails:
Creates areas of flat color by recursively splitting high detail chunks
-p Use proportianally sized sections (default is square sized sections)
-s (number[%]) Multiple or percent of image dimension used for splitting (default 2.0)
-r (number[%]) Count or percent of sections to re-split (default 50%)
Function PixelBinning:
Groups neighbor pixels into bins and calculates a resulting single color for that group
-s (w,h) Size of Bin in pixels (default 2x2)
-c (Calculation) Calculation to use (default Add)
-a Include alpha channel (normally averaged)
-l Create a new layer for the output
-r Resize the layer to fit the resulting bins
Available Calculations
1. Add color values added
2. Average color values are averaged
3. RMS color values are combined using root mean square
4. Min Picks the smallest color value in the group
5. Max Picks the largest color value in the group
Function PixelRules:
Average a set of pixels by following a minimaztion function
-m (Mode) Which mode to use (default StairCaseDescend)
-n (number) Number of times to apply operation (default 1)
-x (number) Maximum number of iterations - in case of infinite loops (default 100)
--sampler (name) Use given (registered) sampler (defaults to nearest neighbor)
--metric (name) Use a (registered) distance metric (defaults to euclidean)
Available Modes
0. None
1. StairCaseDescend move towards smallest distance
2. StairCaseAscend move towards largest distance
3. StairCaseClosest move towards closest distance
4. StairCaseFarthest move towards farthest distance
Function ProbableImg:
Generate a new image using a probability profile based on the input image
-n (number) Max Number of start nodes (defaults to 1 or number of -pp/-xy options)
-rs (seed) Options number seed for the random number generator
-xy (x,y) Add a start node (in pixels) - multiple allowed
-pp (x,y) Add a start node (by proportion) - multiple allowed
-alt Use alternate rendering uses slightly less memory
Function SliceComponent:
Slices an image component into multiple layers.
--space (name) Use a (registered) color(3) space (defaults to RGB)
-c (component) Component to slice (default R)
-n (number) Number of slices to use (default 16)
-r (number[%]) Reset the component to given value (0.0-1.0 / 0%-100%)
-o (number) Keep only a specific slice between 1 and -n
Function SpearGraphic:
Creates a spear graphic
-g (Graphic) Choose which graphic to create
-bg (color) Change Background color (default transparent)
-rs (number) Random Int32 seed value (defaults to system picked)
Available Graphics
1. First_Twist1
2. First_Twist2
3. First_Twist3
4. Second_Twist3a
5. Second_Twist3b
6. Second_Twist3c
7. Second_Twist4
8. Third
9. Fourth
Function Swirl:
Smears pixels in a circle around a point
-cx (x,y) Swirl center X and Y coordinate in pixels
-cp (x,y) Swirl center X and Y coordinate proportionally (default 50%,50%)
-rx (number) Swirl radius in pixels
-rp (number[%]) Swirl radius proportional to smallest image dimension (default 90%)
-s (number) Number of rotations (default 0.9)
-ccw Rotate Counter-clockwise. (default is clockwise)
--sampler (name) Use given (registered) sampler (defaults to nearest neighbor)
--metric (name) Use a (registered) distance metric (defaults to euclidean)
Function Turmites:
Turing machine mites/ants. see https://en.wikipedia.org/wiki/Turmite
-p (Pattern) LR pattern string. See below for full language (default 'LR')
-e (EdgeRule) Change edge handling rule (default Wrap)
-s (x,y) Starting location of turmite (defaults to center coordinate)
-i (number) Number of iterations (default 1000)
Available Edge Rules:
0. None
1. Wrap Wrap around to the other side
2. Reflect Turn around at the edge
Pattern language:
The pattern language consist of a string of characters used to decide which action to take.
Adding a number after the letter will repeat that rule. For example R3 is the same as RRR.
L Make a left turn (counterclock-wise)
R Make a right turn (clock-wise)
U Turn around (180 degree turn)
F Continue forward (no turn)
N Point north
S Point south
E Point east
W Point west
Function UlamSpiral:
Creates an Ulam spiral graphic
-p Color pixel if prime (true if -f not specified)
-f Color pixel based on number of divisors; dot size is proportional to divisor count
-6m Color primes depending on if they are 6*m+1 or 6*m-1
-cc (x,y) Center x,y coordinate (default 0,0)
-m (Mapping) Mapping used to translate x,y into an index number (default spiral)
-s (number) Spacing between points (default 1)
-ds (number) Maximum dot size in pixels; decimals allowed (default 1.0)
-dt (Dot) Dot used for drawing (default circle)
-c1 (color) Color to be used depending on mode. (optional)
-c2 (color) Color to be used depending on mode. (optional)
-c3 (color) Color to be used depending on mode. (optional)
-c4 (color) Color to be used depending on mode. (optional)
Color Mappings:
default c1=background c2=primes
-f c1=background c2=primes c3=composites
-6m c1=background c2=6m-1 c3=composites c4=6m+1
Available Mappings:
1. Linear Linear mapping left to right, top to bottom
2. Diagonal Diagonal winding from top left
3. Spiral Spiral mapping inside to outside
Available Dot Types:
1. Blob Draws a spherical fading dot
2. Circle Draws a regular circle
3. Square Draws a regular square
Function ZoomBlur:
Blends rays of pixels to produce a 'zoom' effect
-z (number[%]) Zoom amount (default 1.1)
-cx (x,y) Coordinates of zoom center in pixels
-cp (x,y) Coordinates of zoom center by proportion (default 50% 50%)
--sampler (name) Use given (registered) sampler (defaults to nearest neighbor)
--metric (name) Use a (registered) distance metric (defaults to euclidean)
Registered Items:
Color:
AliceBlue
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
Pink
Plum
PowderBlue
Purple
RebeccaPurple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Transparent
Turquoise
Violet
Wheat
White
WhiteSmoke
Yellow
YellowGreen
Color3Space:
Cie1931 [X,Y,Z,A] - International Commission on Illumination 1931
Cie1960 [U,V,W,A] - International Commission on Illumination 1960
Cmy [C,M,Y,A] - Cyan, Magenta, Yellow
Hsi [H,S,I,A] - Hue, Saturation, Intensity
Hsl [H,S,L,A] - Hue, Saturation, Lightness
Hsv [H,S,V,A] - Hue, Saturation, Value
LinearRgb [R,G,B,A] - RGB with D65 gamma removed
Rgb [R,G,B,A] - Red, Green, Blue (passthrough)
YCbCrBt202 [Y,B,R,A] - Luma, Blue-Red difference chroma : BT. 2020
YCbCrBt601 [Y,B,R,A] - Luma, Blue-Red difference chroma : BT. 601
YCbCrBt709 [Y,B,R,A] - Luma, Blue-Red difference chroma : BT. 709
YCbCrJpeg [Y,B,R,A] - Luma, Blue-Red difference chroma
YCbCrSmpte240m [Y,B,R,A] - Luma, Blue-Red difference chroma : SMPTE 240M
YDbDr [Y,B,R,A] - Luma, Blue-Red difference chroma : SECAM
Yiq [Y,I,Q,A] - Luma, In-phase, Quadrature : NTSC 1953
YiqFcc [Y,I,Q,A] - Luma, In-phase, Quadrature : FCC 1987
YuvBT601 [Y,U,V,A] - Luma, U-axis, V-axis : BT. 601
YuvBT709 [Y,U,V,A] - Luma, U-axis, V-axis : BT. 709
Color4Space:
Cmyk [C,M,Y,K,A] - Cyan, Magenta, Yellow, and Key (black)
Engine:
ImageMagick
SixLabors
SkiaSharp
Function:
AllColors
AreaSmoother
AreaSmoother2
AutoWhiteBalance
ComplexPlot
Deform
Derivatives
DistanceColoring
Encrypt
FibSquares
FloodFill
Gradient
GraphNet
ImgDiff
Life
Line
Maze
PixelateDetails
PixelBinning
PixelRules
ProbableImg
SliceComponent
SpearGraphic
Swirl
Turmites
UlamSpiral
ZoomBlur
Gradient:
FullRGB
Gimp Abstract 1
Gimp Abstract 2
Gimp Abstract 3
Gimp Aneurism
Gimp Blinds
Gimp Blue Green
Gimp Browns
Gimp Brushed Aluminium
Gimp Burning Paper
Gimp Burning Transparency
Gimp Caribbean Blues
Gimp CD
Gimp CD Half
Gimp Coffee
Gimp Cold Steel
Gimp Cold Steel 2
Gimp Crown Molding
Gimp Dark 1
Gimp Deep Sea
Gimp Default
Gimp Flare Glow Angular 1
Gimp Flare Glow Radial 1
Gimp Flare Glow Radial 2
Gimp Flare Glow Radial 3
Gimp Flare Glow Radial 4
Gimp Flare Radial 101
Gimp Flare Radial 102
Gimp Flare Radial 103
Gimp Flare Rays Radial 1
Gimp Flare Rays Radial 2
Gimp Flare Rays Size 1
Gimp Flare Sizefac 101
Gimp Four Bars
Gimp Full Saturation Spectrum CCW
Gimp Full Saturation Spectrum CW
Gimp Golden
Gimp Greens
Gimp Horizon 1
Gimp Horizon 2
Gimp Incandescent
Gimp Land 1
Gimp Land and Sea
Gimp Metallic Something
Gimp Nauseating Headache
Gimp Neon Cyan
Gimp Neon Green
Gimp Neon Yellow
Gimp Pastel Rainbow
Gimp Pastels
Gimp Purples
Gimp Radial Eyeball Blue
Gimp Radial Eyeball Brown
Gimp Radial Eyeball Green
Gimp Radial Glow 1
Gimp Radial Rainbow Hoop
Gimp Rounded Edge
Gimp Shadows 1
Gimp Shadows 2
Gimp Shadows 3
Gimp Skyline
Gimp Skyline Polluted
Gimp Square Wood Frame
Gimp Sunrise
Gimp Three Bars Sin
Gimp Tropical Colors
Gimp Tube Red
Gimp Wood 1
Gimp Wood 2
Gimp Yellow Contrast
Gimp Yellow Orange
Monochrome
Metric:
Canberra
Chebyshev
ChebyshevInv
Euclidean
Manhattan
Sampler:
Bicubic
Box
CatmullRom
Hermite
Lanczos2
Lanczos3
Lanczos5
Lanczos8
MitchellNetravali
NearestNeighbor
Robidoux
RobidouxSharp
Spline
Triangle
Welch
Supported Image Formats for Selected Engine - SixLabors
Legend: R = Reading, W = Writting, M = Multiple layers
PNG [RW ] image/png [png,apng]
JPEG [RW ] image/jpeg [jpg,jpeg,jfif]
GIF [RWM] image/gif [gif]
BMP [RW ] image/bmp [bm,bmp,dip]
PBM [RW ] image/x-portable-pixmap [ppm,pbm,pgm]
TGA [RW ] image/tga [tga,vda,icb,vst]
TIFF [RWM] image/tiff [tiff,tif]
Webp [RW ] image/webp [webp]
QOI [RW ] image/qoi [qoi]