nils-image-processing-0.3.6 is not a library.
image-processing
Overview
image-processing is a batch image CLI with two execution paths:
- Rust SVG path:
convert --from-svg <path> --to png|webp|svg --out <file>svg-validate --in <svg> --out <svg>
- Legacy transform path (ImageMagick):
auto-orient|convert|resize|rotate|crop|pad|flip|flop|optimize
generate has been removed. Use intent -> SVG -> svg-validate -> convert --from-svg instead.
Usage
Usage:
image-processing <subcommand> [flags]
Subcommands:
info | svg-validate | auto-orient | convert | resize | rotate | crop | pad | flip | flop | optimize
Help:
image-processing --help
Commands
info: Probe inputs and emit metadata summary (no output mode).svg-validate: Validate + sanitize one SVG input into one SVG output.convert: Convert image formats.- Legacy mode:
--in ... --to png|jpg|webp. - SVG mode:
--from-svg <path> --to png|webp|svg --out <file>.
- Legacy mode:
resize: Resize by--scale,--width/--height, or--aspect+--fit(contain|cover|stretch).rotate: Rotate by degrees; requires--degrees.crop: Crop by--rect,--size, or--aspect(exactly one).pad: Pad to a target size; requires--widthand--height.flip: Apply ImageMagick-flip.flop: Apply ImageMagick-flop.optimize: Optimizejpgorwebpoutputs; supports--quality,--lossless,--no-progressive.
Common flags
- Inputs (legacy transform commands only):
--in <path>(repeatable, required),--recursive,--glob <pattern>(repeatable) - Source SVG mode:
--from-svg <path>(convert only) - Output mode:
--out <file>,--out-dir <dir>, or--in-place(requires--yes) - Output controls:
--overwrite,--dry-run,--json,--report - Transform options:
--no-auto-orient,--strip-metadata,--background <color>
--from-svg contract (v1)
- Allowed only on
convert. - Required:
--to png|webp|svg,--out <file>. - Forbidden with
--from-svg:--in,--recursive,--glob,--out-dir,--in-place. --outextension must match--to.- This path is Rust-backed (
usvg/resvg) and does not require ImageMagick.
svg-validate contract
- Required: exactly one
--in <svg>and--out <svg>. - Forbidden:
--from-svg,--recursive,--glob,--out-dir,--in-place. - Output is deterministic for identical input.
Examples
Exit codes
0: Success with no item errors.1: Runtime failure or one-or-more items failed.2: Usage/validation error.
Dependencies
convert --from-svgandsvg-validate: no external binary dependency (Rust backend).- Legacy transform subcommands: ImageMagick (
magick, orconvert+identify). - Optional:
cjpeg/djpegfor JPEG optimize,cwebp/dwebpfor WebP optimize.