PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Merge remote-tracking branch 'origin/main' into fix/tiff-alpha-compression
Finn Newick5c665ca96f1f
diff --cc apps/photocraft-cli/src/lib.rsindex 17eb7b227,03001ab02..6c006b3ae--- a/apps/photocraft-cli/src/lib.rs+++ b/apps/photocraft-cli/src/lib.rs@@@ -12,13 -12,12 +12,13 @@@ use photocraft_io::ExportOptionsuse serde_json::{Value, json};pub const USAGE: &str = "\- photocraft-cli: headless Photocraft+ photocraft-cli: headless PhotoCraftUSAGE:- photocraft-cli convert <in> <out> [--format <ext>] [--quality <1-100>] [--tiff-layers] [--tga-bits <24|32>] [--dpx-bits <8|10|12|16>]+ photocraft-cli convert <in> <out> [--format <ext>] [--quality <1-100>] [--tiff-layers] [--tiff-compression <none|lzw|zip>] [--tga-bits <24|32>] [--dpx-bits <8|10|12|16>]Convert between formats (.pcraft, .psd, .png, .jpg, .tif, .webp, .exr, …).- TIFF output is flat unless --tiff-layers keeps the layers (Photoshop layer data).+ TIFF output is flat unless --tiff-layers keeps the layers (Photoshop layer data);+ --tiff-compression compresses it (none, the default; lzw; zip).--quality sets the JPEG or WebP quality; a WebP written with a quality is lossy, without one lossless.--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.diff --cc crates/engine/src/file_cmds.rsindex dfa313ebc,1fb3fcf30..80fd536ec--- a/crates/engine/src/file_cmds.rs+++ b/crates/engine/src/file_cmds.rs@@@ -1623,7 -1653,7 +1682,7 @@@ pub fn specs() -> Vec<CommandSpec>"Save a Copy…",&["File"],Some("Cmd+Alt+S"),- r##"{"path":str (format from the extension),"quality":0..12? (JPEG),"layers":bool=true,"tiffLayers":bool=false (TIFF: keep the layers; flat by default),"tiffCompression":"none|lzw|zip"? (TIFF: image compression; unset, none),"tgaBits":24|32? (TGA: 32 writes the alpha channel, or else the transparency, as the alpha; unset, 32 with an alpha channel or transparency, else 24),"dpxBits":8|10|12|16? (DPX: bits per sample; unset, 8 for an 8-bit document, else 16)}"##,- r##"{"path":str (format from the extension),"quality":0..12? (JPEG),"layers":bool=true,"overwrite":bool=false (replace the document's own file),"tiffLayers":bool=false (TIFF: keep the layers; flat by default),"tgaBits":24|32? (TGA: 32 writes the alpha channel, or else the transparency, as the alpha; unset, 32 with an alpha channel or transparency, else 24),"dpxBits":8|10|12|16? (DPX: bits per sample; unset, 8 for an 8-bit document, else 16)}"##,++ r##"{"path":str (format from the extension),"quality":0..12? (JPEG),"layers":bool=true,"overwrite":bool=false (replace the document's own file),"tiffLayers":bool=false (TIFF: keep the layers; flat by default),"tiffCompression":"none|lzw|zip"? (TIFF: image compression; unset, none),"tgaBits":24|32? (TGA: 32 writes the alpha channel, or else the transparency, as the alpha; unset, 32 with an alpha channel or transparency, else 24),"dpxBits":8|10|12|16? (DPX: bits per sample; unset, 8 for an 8-bit document, else 16)}"##,native_doc,save_a_copy),