PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Merge branch 'claude/github-issue-7437-2fb28f' into claude/run-out-refuses-input-7437
Khawar Zamman Wanie2a895c8dca9
diff --cc apps/photocraft-cli/src/lib.rsindex 6b974d5d5,41fced937..15660f65b--- a/apps/photocraft-cli/src/lib.rs+++ b/apps/photocraft-cli/src/lib.rs@@@ -24,13 -24,14 +24,15 @@@ USAGE--tga-bits sets a TGA's bits per pixel: 32 writes the alpha channel (or else the transparency) asits alpha, 24 none. Without it: 32 with an alpha channel or transparency, else 24.--dpx-bits sets a DPX's bits per sample. Without it: 8 for an 8-bit document, else 16.+ --dds-compression sets a DDS texture's compression: none (uncompressed, the default), bc1+ (DXT1: alpha on or off), bc2 (DXT3) or bc3 (DXT5). --dds-mipmaps also writes the full mip chain.photocraft-cli info <file> [--compact]Print the document as JSON (size, mode, depth, layer tree).- photocraft-cli run (<file> | --new <json>) --cmd <id> [--params <json>] [--cmd …] [--out <file>] [--format <ext>] [--quality <1-100>] [--in-place] [--tiff-layers] [--tga-bits <24|32>] [--dpx-bits <8|10|12|16>]- photocraft-cli run (<file> | --new <json>) --cmd <id> [--params <json>] [--cmd …] [--out <file>] [--format <ext>] [--quality <1-100>] [--tiff-layers] [--tga-bits <24|32>] [--dpx-bits <8|10|12|16>] [--dds-compression <none|bc1|bc2|bc3>] [--dds-mipmaps]++ photocraft-cli run (<file> | --new <json>) --cmd <id> [--params <json>] [--cmd …] [--out <file>] [--format <ext>] [--quality <1-100>] [--in-place] [--tiff-layers] [--tga-bits <24|32>] [--dpx-bits <8|10|12|16>] [--dds-compression <none|bc1|bc2|bc3>] [--dds-mipmaps]Open a file, run engine commands in order, save the result. Each --params- applies to the preceding --cmd. Prints each command's JSON result.+ applies to the preceding --cmd. Prints each command's JSON result. An --out that is the+ <file> is refused, as the result would replace the original; --in-place allows it.- photocraft-cli batch --actions <actions.json|set.atn> [--action <name>] --in <dir> --out <dir> [--format <ext>] [--quality <1-100>] [--in-place] [--tiff-layers] [--tga-bits <24|32>] [--dpx-bits <8|10|12|16>]+ photocraft-cli batch --actions <actions.json|set.atn> [--action <name>] --in <dir> --out <dir> [--format <ext>] [--quality <1-100>] [--in-place] [--tiff-layers] [--tga-bits <24|32>] [--dpx-bits <8|10|12|16>] [--dds-compression <none|bc1|bc2|bc3>] [--dds-mipmaps]Apply an action list to every image in a directory. A Photoshop Actions file (.atn) is aset: its action --action names plays, as below. JSON steps are [id, params] pairs,{\"command\": id, \"params\": {…}} objects or bare ids, as a recorded action or droplet stores them@@@ -76,8 -82,8 +83,8 @@@ const SUBCOMMANDS: &[Subcommand] = &Subcommand { name: "info", values: &[], bare: &["--compact"], run: |a, out, _| info(a, out) },Subcommand {name: "run",- values: &["--new", "--cmd", "--params", "--out", "--format", "--quality", "--tga-bits", "--dpx-bits"],- bare: &["--in-place", "--tiff-layers"],+ values: &["--new", "--cmd", "--params", "--out", "--format", "--quality", "--tga-bits", "--dpx-bits", "--dds-compression"],- bare: &["--tiff-layers", "--dds-mipmaps"],++ bare: &["--in-place", "--tiff-layers", "--dds-mipmaps"],run: run_cmds,},Subcommand {