Reference · Editing
pxart mask
Erase every pixel outside rectangles or circles (or inside, --invert), or by key; a PNG too.
mask FILE[:frame] --keep x,y,w,h | --keep-circle cx,cy,r ... [--dither N] [--invert] [--keep-keys K,K | --drop-keys K,K] [-o OUT]
usage: pxart mask [-h] [-o O] [--keep KEEP] [--keep-circle KEEP_CIRCLE] [--dither DITHER]
[--invert] [--keep-keys KEEP_KEYS | --drop-keys DROP_KEYS] [--dry-run]
file
mask FILE[:frame] --keep x,y,w,h | --keep-circle cx,cy,r ... [--dither N] [--invert]
[--keep-keys K,K | --drop-keys K,K] [-o OUT]
Erase every pixel outside rectangles or circles (or inside, --invert), or by key; a PNG too.
positional arguments:
file
options:
-h, --help show this help message and exit
-o O
--keep KEEP x,y,w,h (repeatable: kept = inside any shape)
--keep-circle KEEP_CIRCLE cx,cy,r (repeatable)
--dither DITHER ordered-dither falloff band N px wide inside each circle's edge
--invert erase inside the shapes, keep the outside
--keep-keys KEEP_KEYS erase every pixel whose key isn't one of these
--drop-keys DROP_KEYS erase every pixel whose key is one of these
--dry-run print what the edit says and a diff of the file it would change; write nothing
Erase (set to '.') every pixel outside the rectangle or circle (kept: distance from
the pixel to cx,cy <= r). --dither N fades the circle's last N px inside its edge
with a 4x4 ordered (Bayer) dither: a light radius. --invert erases the inside and
keeps the outside, dither band mirrored, so a mask and its --invert split the image
with no overlap or gap. --keep and --keep-circle repeat, and mix: the kept area is
their union, and --dither and --invert work over the union.
FILE may be a PNG (a scene rendered at --scale 1: coordinates are its pixels): outside
pixels become transparent. -o must be a .png too.
--keep-keys W,T,t (or WTt) erases every pixel whose key isn't one of those; --drop-keys
erases those keys' pixels. Alone, they mask by key over the whole frame; with shapes, a
pixel stays only when both keep it (the shapes, --invert and --dither as above). .px only.
See also, in pxart help all: EDITING (-o OUT gets the whole file, only changed lines are
rewritten, 'no change'); FORMAT: selecting frames (FILE:SEL, an unnamed grid's name, zsh's
"${F}:sel").
pxart help all has the whole reference, pxart help TOPIC one part of it.This is the output of pxart help mask. The other editing commands and their shared notes are in pxart help EDITING.
This page is built from
site/src/data/reference.json in the repository.Edit on GitHub