PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Merge remote-tracking branch 'origin/main' into HEAD
David Mann925cb86c4b07
diff --cc apps/photocraft-web/src/web.rsindex 224a2281e,0bec8646c..57707c75e--- a/apps/photocraft-web/src/web.rs+++ b/apps/photocraft-web/src/web.rs@@@ -17,11 -17,11 +17,11 @@@ use wasm_bindgen::JsCast as _type Inbox = Arc<Mutex<Vec<(String, Vec<u8>)>>>;/// Everything File › Open reads: PhotoCraft, Photoshop, OpenRaster, Krita and Affinity documents, flat images, and-/// Photoshop brushes (.abr), gradients (.grd) and swatches (.aco, .ase), which go to the preset libraries.+/// Photoshop brushes (.abr), gradients (.grd) and swatches (.aco, .act, .ase), which go to the preset libraries.const OPEN_EXTS: &[&str] = &[- "pcraft", "pdn", "ora", "kra", "krz", "psd", "psb", "psdt", "png", "jpg", "jpeg", "tif", "tiff", "webp", "gif", "bmp", "tga", "ico", "qoi", "exr", "hdr",- "pbm", "pgm", "ppm", "pam", "pfm", "dds", "fits", "fit", "fts", "dpx", "cin", "heic", "heif", "hif", "dng", "cr2", "cr3", "nef", "nrw", "arw", "pef",- "orf", "rw2", "raf", "abr", "grd", "svg", "svgz", "aco", "act", "ase", "af", "afdesign", "afphoto", "afpub",+ "pcraft", "pdn", "ora", "xcf", "xcfgz", "gz", "kra", "krz", "psd", "psb", "psdt", "png", "jpg", "jpeg", "tif", "tiff", "webp", "gif", "bmp", "tga", "ico",+ "qoi", "exr", "hdr", "pbm", "pgm", "ppm", "pam", "pfm", "dds", "fits", "fit", "fts", "dpx", "cin", "heic", "heif", "hif", "dng", "cr2", "cr3", "nef",- "nrw", "arw", "pef", "orf", "rw2", "raf", "abr", "grd", "svg", "svgz", "aco", "ase", "af", "afdesign", "afphoto", "afpub",++ "nrw", "arw", "pef", "orf", "rw2", "raf", "abr", "grd", "svg", "svgz", "aco", "act", "ase", "af", "afdesign", "afphoto", "afpub",];const SVG_EXTS: &[&str] = &["svg", "svgz"];const CANVAS_ID: &str = "photocraft_canvas";diff --cc apps/photocraft/src/services.rsindex cebca731d,082506e92..a6a50ed08--- a/apps/photocraft/src/services.rs+++ b/apps/photocraft/src/services.rs@@@ -17,12 -17,12 +17,12 @@@ use std::sync::Arcmod recovery_tests;/// Everything File › Open reads: PhotoCraft, Photoshop, OpenRaster, Krita and Affinity documents, flat images, and-/// Photoshop brushes (.abr), gradients (.grd), swatches (.aco, .ase) and keyboard shortcut sets+/// Photoshop brushes (.abr), gradients (.grd), swatches (.aco, .act, .ase) and keyboard shortcut sets/// (.kys), which go to the preset libraries and Edit › Keyboard Shortcuts.const OPEN_EXTS: &[&str] = &[- "pcraft", "pdn", "ora", "kra", "krz", "psd", "psb", "psdt", "png", "jpg", "jpeg", "tif", "tiff", "webp", "gif", "bmp", "tga", "ico", "qoi", "exr", "hdr",- "pbm", "pgm", "ppm", "pam", "pfm", "pcx", "dds", "xpm", "fits", "fit", "fts", "dpx", "cin", "heic", "heif", "hif", "dng", "cr2", "cr3", "nef", "nrw",- "arw", "pef", "orf", "rw2", "raf", "abr", "grd", "svg", "svgz", "aco", "act", "ase", "kys", "af", "afdesign", "afphoto", "afpub",+ "pcraft", "pdn", "ora", "xcf", "xcfgz", "gz", "kra", "krz", "psd", "psb", "psdt", "png", "jpg", "jpeg", "tif", "tiff", "webp", "gif", "bmp", "tga", "ico",+ "qoi", "exr", "hdr", "pbm", "pgm", "ppm", "pam", "pfm", "pcx", "dds", "xpm", "fits", "fit", "fts", "dpx", "cin", "heic", "heif", "hif", "dng", "cr2",- "cr3", "nef", "nrw", "arw", "pef", "orf", "rw2", "raf", "abr", "grd", "svg", "svgz", "aco", "ase", "kys", "af", "afdesign", "afphoto", "afpub",++ "cr3", "nef", "nrw", "arw", "pef", "orf", "rw2", "raf", "abr", "grd", "svg", "svgz", "aco", "act", "ase", "kys", "af", "afdesign", "afphoto", "afpub",];const SVG_EXTS: &[&str] = &["svg", "svgz"];diff --cc xtask/src/corpus.rsindex c65abba9f,10c528d5c..4cd276d6c--- a/xtask/src/corpus.rs+++ b/xtask/src/corpus.rs@@@ -34,9 -34,8 +35,9 @@@ const CRITICAL: &[&str] = &"crates/format/","crates/affinity/","crates/raw/",+ "crates/engine/src/atn_cmds",];- /// `cargo xtask corpus [--all | --pngsuite | --download | --psd | --psd-tools | --heif | --exr | --pixls | --affinity | --atn | --photoshop [--local]] [--update-manifest]`-/// `cargo xtask corpus [--all | --pngsuite | --download | --psd | --psd-tools | --heif | --exr | --pixls | --affinity | --photoshop [--local] | --gimp [--local]] [--update-manifest]`++/// `cargo xtask corpus [--all | --pngsuite | --download | --psd | --psd-tools | --heif | --exr | --pixls | --affinity | --atn | --photoshop [--local] | --gimp [--local]] [--update-manifest]`pub fn cmd(args: &[&str]) -> Result<(), String> {let update = args.contains(&"--update-manifest");let mut did = false;diff --cc xtask/src/corpus_pins.rsindex bfb152b6d,24e777077..641d1ef26--- a/xtask/src/corpus_pins.rs+++ b/xtask/src/corpus_pins.rs@@@ -239,75 -267,8 +267,75 @@@ pub const AFFINITY: PinnedCorpus = Pinn)},};+/// Photoshop Actions files (`.atn`) from public repositories under permissive licences, the+/// real-file oracles of `photocraft-psd::atn` and the engine's `.atn` import (2026-10-12).+/// https://github.com/sbaril/Photoshop-Scripts (MIT): `Actions/`.+pub const SBARIL_COMMIT: &str = "622493c9c617c9d2ff38500e8e512c0ad421eed9";+/// https://github.com/bjango/Bjango-Actions (BSD, `Help/License.md`): three sets at the root.+pub const BJANGO_COMMIT: &str = "0fdc790b4931fd36816e6056dd84c2aa0d3ff054";+/// https://github.com/BKWLD/photoshop-actions (MIT).+pub const BKWLD_COMMIT: &str = "d1a5d24e02bf23f78659106473ef7d8c747bea00";+/// https://github.com/mrijk/atntools (MIT): the fixture of a Rust `.atn` reader.+pub const ATNTOOLS_COMMIT: &str = "529db30b631f32bc7970121af0393853c2154fa0";+/// https://github.com/damsmcfly/photoshop-cleaner-trimmer (Unlicense).+pub const TRIMMER_COMMIT: &str = "fd3814df2a625ed7a015633eb91d8fe2f5bbe9a0";+/// https://github.com/uclagamelab/AlphaUtilityAdditions (BSD-2-Clause).+pub const ALPHA_UTILITY_COMMIT: &str = "7bdae950a7db4c6c2224bcaf08f4c17ec18958cb";+/// https://github.com/overbyte/photoshop-gif-creator-script (MIT).+pub const GIF_CREATOR_COMMIT: &str = "9fb78e8c09a21678afc84ccb31a435bd242894df";++/// `corpus/atn`: Photoshop Actions sets from seven public repositories, one folder each.+pub const ATN: PinnedCorpus = PinnedCorpus {+ name: "atn",+ dest: "atn",+ upstreams: &[+ Upstream { prefix: "sbaril/", repo: "sbaril/Photoshop-Scripts", commit: SBARIL_COMMIT, subdir: "Actions", extras: &[("LICENSE", "sbaril/LICENSE")] },+ Upstream { prefix: "bjango/", repo: "bjango/Bjango-Actions", commit: BJANGO_COMMIT, subdir: "", extras: &[("Help/License.md", "bjango/License.md")] },+ Upstream { prefix: "bkwld/", repo: "BKWLD/photoshop-actions", commit: BKWLD_COMMIT, subdir: "", extras: &[("LICENSE", "bkwld/LICENSE")] },+ Upstream { prefix: "atntools/", repo: "mrijk/atntools", commit: ATNTOOLS_COMMIT, subdir: "", extras: &[("LICENSE", "atntools/LICENSE")] },+ Upstream {+ prefix: "trimmer/",+ repo: "damsmcfly/photoshop-cleaner-trimmer",+ commit: TRIMMER_COMMIT,+ subdir: "",+ extras: &[("LICENSE", "trimmer/LICENSE")],+ },+ Upstream {+ prefix: "alpha-utility/",+ repo: "uclagamelab/AlphaUtilityAdditions",+ commit: ALPHA_UTILITY_COMMIT,+ subdir: "",+ extras: &[("LICENSE", "alpha-utility/LICENSE")],+ },+ Upstream {+ prefix: "gif-creator/",+ repo: "overbyte/photoshop-gif-creator-script",+ commit: GIF_CREATOR_COMMIT,+ subdir: "",+ extras: &[("LICENSE", "gif-creator/LICENSE")],+ },+ ],+ manifest: "xtask/atn-corpus.sha256",+ exts: &["atn"],+ subset: false,+ sources_md: |c| {+ format!(+ "# Photoshop Actions (.atn) corpus\n\nAction sets from public repositories, unmodified, each in its own folder with its licence: \+ `sbaril/` (https://github.com/sbaril/Photoshop-Scripts/tree/{SBARIL_COMMIT}/Actions, MIT), \+ `bjango/` (https://github.com/bjango/Bjango-Actions/tree/{BJANGO_COMMIT}, BSD), \+ `bkwld/` (https://github.com/BKWLD/photoshop-actions/tree/{BKWLD_COMMIT}, MIT), \+ `atntools/` (https://github.com/mrijk/atntools/tree/{ATNTOOLS_COMMIT}, MIT), \+ `trimmer/` (https://github.com/damsmcfly/photoshop-cleaner-trimmer/tree/{TRIMMER_COMMIT}, Unlicense), \+ `alpha-utility/` (https://github.com/uclagamelab/AlphaUtilityAdditions/tree/{ALPHA_UTILITY_COMMIT}, BSD-2-Clause), \+ `gif-creator/` (https://github.com/overbyte/photoshop-gif-creator-script/tree/{GIF_CREATOR_COMMIT}, MIT). \+ Fetched and sha256-verified by `cargo xtask corpus --atn` against `{}`. Gitignored; never commit these files.\n",+ c.manifest+ )+ },+};+/// Every pinned corpus, in fetch order.- pub const ALL: &[&PinnedCorpus] = &[&PSD_MIXED, &PSD_TOOLS, &PHOTOSHOP, &HEIF, &EXR, &AFFINITY, &ATN];-pub const ALL: &[&PinnedCorpus] = &[&PSD_MIXED, &PSD_TOOLS, &PHOTOSHOP, &GIMP, &HEIF, &EXR, &AFFINITY];++pub const ALL: &[&PinnedCorpus] = &[&PSD_MIXED, &PSD_TOOLS, &PHOTOSHOP, &GIMP, &HEIF, &EXR, &AFFINITY, &ATN];/// `corpus/pixls`: real camera raws from <https://raw.pixls.us> (released into the public/// domain / CC0 by their photographers; see ATTRIBUTION.md). One file per decode pathdiff --cc xtask/src/main.rsindex d849d58d5,9106dec54..544e427a2--- a/xtask/src/main.rs+++ b/xtask/src/main.rs@@@ -25,10 -25,10 +25,10 @@@ commandslayers enforce the crate dependency layering (plan/architecture.md §3)wasm cargo check --target wasm32-unknown-unknown for the wasm-safe cratesci fmt --check, clippy -D warnings, test, layers, wasm (stops at first failure)- corpus [--all | --pngsuite | --psd | --psd-tools | --pixls | --atn | --photoshop] [--local] [--update-manifest]- corpus [--all | --pngsuite | --psd | --psd-tools | --pixls | --photoshop | --gimp] [--local] [--update-manifest]++ corpus [--all | --pngsuite | --psd | --psd-tools | --pixls | --atn | --photoshop | --gimp] [--local] [--update-manifest]show where test corpora live and their pins (xtask/src/corpus_pins.rs), or fetchthem into corpus/ (pinned commits, sha256-verified; --all = every corpus but pixls,- --photoshop --local copies from ../photocraft-corpus or $PHOTOCRAFT_CORPUS_REPO)+ --photoshop/--gimp --local copy from ../photocraft-corpus or $PHOTOCRAFT_CORPUS_REPO)test-corpus [-p <crate>]... [--changed] [--pixls] [--local] [-- <test args>]fetch every corpus, then cargo test --release --features corpus on the corpuscrates; --changed runs only if psd/io/codecs/compose/gpu/text/format/raw changed;