diff --git a/Cargo.lock b/Cargo.lock index 5db9d55ce0e..5bc7ce4ae2c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1320,7 +1320,7 @@ dependencies = [ [[package]] name = "craft-affinity" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "crc32fast", "flate2", @@ -1331,7 +1331,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "rustix 1.1.5", ] @@ -1339,7 +1339,7 @@ dependencies = [ [[package]] name = "craft-crw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "thiserror 2.0.21", ] @@ -1347,17 +1347,17 @@ dependencies = [ [[package]] name = "craft-docpath" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" [[package]] name = "craft-eps" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" [[package]] name = "craft-file-formats" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "craft-eps", "craft-idml", @@ -1375,12 +1375,12 @@ dependencies = [ [[package]] name = "craft-fonts-build" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" [[package]] name = "craft-heif" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "heic-rs", "rayon", @@ -1389,7 +1389,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "fixed_decimal", "icu_decimal", @@ -1412,7 +1412,7 @@ dependencies = [ [[package]] name = "craft-idml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "craft-xml", "craft-zip", @@ -1422,7 +1422,7 @@ dependencies = [ [[package]] name = "craft-image-codecs" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "craft-heif", "craft-jpeg", @@ -1445,7 +1445,7 @@ dependencies = [ [[package]] name = "craft-jpeg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "thiserror 2.0.21", ] @@ -1453,7 +1453,7 @@ dependencies = [ [[package]] name = "craft-kra" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "craft-xml", "craft-zip", @@ -1463,7 +1463,7 @@ dependencies = [ [[package]] name = "craft-metadata" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "brotli-decompressor 6.3.1", "chrono", @@ -1475,7 +1475,7 @@ dependencies = [ [[package]] name = "craft-ora" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "craft-xml", "craft-zip", @@ -1485,7 +1485,7 @@ dependencies = [ [[package]] name = "craft-pcraft-bundle" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "blake3", "craft-atomic", @@ -1498,7 +1498,7 @@ dependencies = [ [[package]] name = "craft-pcraft-format" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "serde", "serde_json", @@ -1508,7 +1508,7 @@ dependencies = [ [[package]] name = "craft-pdf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "bytemuck", "flate2", @@ -1521,7 +1521,7 @@ dependencies = [ [[package]] name = "craft-pdn" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "flate2", "thiserror 2.0.21", @@ -1530,7 +1530,7 @@ dependencies = [ [[package]] name = "craft-print" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "craft-winprint-gdi", "log", @@ -1544,7 +1544,7 @@ dependencies = [ [[package]] name = "craft-psd" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "encoding_rs", "flate2", @@ -1555,7 +1555,7 @@ dependencies = [ [[package]] name = "craft-raw" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "chrono", "craft-crw", @@ -1573,7 +1573,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "craft-image-codecs", "craft-xml", @@ -1588,7 +1588,7 @@ dependencies = [ [[package]] name = "craft-tiff" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "serde", "thiserror 2.0.21", @@ -1597,7 +1597,7 @@ dependencies = [ [[package]] name = "craft-ui" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "craft-fonts-build", "craft-i18n", @@ -1618,7 +1618,7 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "chrono", "dunce", @@ -1653,7 +1653,7 @@ dependencies = [ [[package]] name = "craft-xcf" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "flate2", "thiserror 2.0.21", @@ -1662,7 +1662,7 @@ dependencies = [ [[package]] name = "craft-xml" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "quick-xml 0.41.0", "thiserror 2.0.21", @@ -1671,7 +1671,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "flate2", "thiserror 2.0.21", @@ -3077,7 +3077,7 @@ dependencies = [ [[package]] name = "hayro" version = "0.7.1" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "bytemuck", "hayro-interpret", @@ -3107,7 +3107,7 @@ dependencies = [ [[package]] name = "hayro-interpret" version = "0.7.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "bitflags 2.13.2", "hayro-cmap", @@ -3125,7 +3125,7 @@ dependencies = [ [[package]] name = "hayro-jbig2" version = "0.3.0" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "fearless_simd", "hayro-ccitt", @@ -3149,7 +3149,7 @@ checksum = "bc2d80da85f31c3fdc0366431f44cfd645a9da1e242ed1f4a61f213d9765660f" [[package]] name = "hayro-syntax" version = "0.7.2" -source = "git+https://github.com/storytold/craft-libs?rev=c0622649f#c0622649ff239b618b999162456fd8b37aa1918c" +source = "git+https://github.com/storytold/craft-libs?rev=a07481b41#a07481b416e0709cb03884592f3e93b4c83d4fd3" dependencies = [ "flate2", "hayro-ccitt", diff --git a/Cargo.toml b/Cargo.toml index 1e9ec1a9e77..63a6db2c9eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0" rust-version = "1.95" [workspace.dependencies] -craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f", features = ["serde"] } +craft-ui = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41", features = ["serde"] } # internal photocraft-geom = { path = "crates/geom" } photocraft-color = { path = "crates/color" } @@ -18,11 +18,11 @@ photocraft-cms = { path = "crates/cms" } photocraft-raster = { path = "crates/raster" } photocraft-doc = { path = "crates/doc" } photocraft-ops = { path = "crates/ops" } -photocraft-psd = { package = "craft-psd", git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -photocraft-codecs = { package = "craft-image-codecs", git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -photocraft-formats = { package = "craft-file-formats", git = "https://github.com/storytold/craft-libs", rev = "c0622649f", features = ["raster-codecs", "pdf", "svg", "ora", "kra", "xcf", "pdn", "raw", "psd", "affinity", "pcraft"] } +photocraft-psd = { package = "craft-psd", git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +photocraft-codecs = { package = "craft-image-codecs", git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +photocraft-formats = { package = "craft-file-formats", git = "https://github.com/storytold/craft-libs", rev = "a07481b41", features = ["raster-codecs", "pdf", "svg", "ora", "kra", "xcf", "pdn", "raw", "psd", "affinity", "pcraft"] } photocraft-raw = { path = "crates/raw" } -photocraft-affinity = { package = "craft-affinity", git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } +photocraft-affinity = { package = "craft-affinity", git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } photocraft-compose = { path = "crates/compose" } photocraft-gpu = { path = "crates/gpu" } photocraft-paint = { path = "crates/paint" } @@ -40,27 +40,27 @@ photocraft-tablet = { path = "crates/tablet" } photocraft-ipp = { path = "crates/ipp" } # external -craft-print = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } +craft-print = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } # HEIC/HEIF: the shared decoder (replaces crates/heif; craft-libs#784). -craft-heif = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f", features = ["raster", "write-raster"] } -craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-pcraft-bundle = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-ora = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-kra = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-xcf = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-pdn = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f", features = ["tree-render", "tree-render-system-fonts"] } -craft-raw = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } +craft-heif = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-pdf = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41", features = ["raster", "write-raster"] } +craft-docpath = { version = "0.1.0", git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-jpeg = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-pcraft-format = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-pcraft-bundle = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-ora = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-kra = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-xcf = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-pdn = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-svg = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41", features = ["tree-render", "tree-render-system-fonts"] } +craft-raw = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +craft-tiff = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } # Interface translations: lookup, fallback, CLDR plurals and language names over the craft-i18n # catalogs that `crates/ui-egui/build.rs` embeds from `CRAFT_I18N_DIR` (storytold/craft-i18n, at # the commit in `craft-i18n.rev`). Already in the tree through craft-ui. -craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } +craft-i18n = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } # craft-update: app-specific pretend versions apply to startup and manual checks. -craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "c0622649f", features = ["egui"] } +craft-update = { git = "https://github.com/storytold/craft-libs", version = "=0.1.0", rev = "a07481b41", features = ["egui"] } thiserror = "2" serde = { version = "1", features = ["derive", "rc"] } serde_json = "1" @@ -220,7 +220,7 @@ egui_demo_lib = { git = "https://github.com/storytold/egui.git", rev = "6d518fc7 egui_inspection = { git = "https://github.com/storytold/egui.git", rev = "6d518fc799681571963842f95b55a6b68431b15a" } winit = { git = "https://github.com/storytold/winit.git", rev = "a517b3846ee8457d84ee4975110bfda6797c44dc" } # craft-pdf's vendored Hayro trees: consumers patch the same craft-libs revision (crates/pdf README). -hayro = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } -hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "c0622649f" } +hayro = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +hayro-syntax = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +hayro-interpret = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } +hayro-jbig2 = { git = "https://github.com/storytold/craft-libs", rev = "a07481b41" } diff --git a/crates/io/src/exr_native.rs b/crates/io/src/exr_native.rs index d886ce58ead..f5b772135c9 100644 --- a/crates/io/src/exr_native.rs +++ b/crates/io/src/exr_native.rs @@ -35,6 +35,9 @@ pub(crate) fn import(source: R, ctl: &Interrupt<'_>) -> Result decoder, Err(_) if ctl.cancelled() => return Err(IoError::Cancelled), + Err(photocraft_codecs::CodecError::LimitExceeded(reason)) if reason.contains("EXR pixel count") => { + return Err(IoError::OutOfMemory("decoded image tiles exceed the available RAM budget; enable a scratch disk or close other documents".into())); + } Err(_) => return Ok(None), }; let info = decoder.info();