From 621504fcda7b634c4ad640eb7f18db7d0a1528b7 Mon Sep 17 00:00:00 2001 From: Codex Date: Mon, 26 Oct 2026 22:38:18 +0300 Subject: [PATCH] Prepare local11 release and cover concurrent JPEG XL color transforms --- mobile/pubspec.yaml | 2 +- native/crates/native_core/tests/jxl.rs | 30 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index ceee13d69..06c54753c 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -2,7 +2,7 @@ name: immich_mobile description: Immich - selfhosted backup media file on mobile phone publish_to: 'none' -version: 3.3.5-local.9+3030502 +version: 3.3.5-local.11+3030503 environment: sdk: '>=3.12.0 <4.0.0' diff --git a/native/crates/native_core/tests/jxl.rs b/native/crates/native_core/tests/jxl.rs index 17b39825d..ef261c5c3 100644 --- a/native/crates/native_core/tests/jxl.rs +++ b/native/crates/native_core/tests/jxl.rs @@ -83,6 +83,36 @@ fn converts_lossy_icc_to_srgb() { } } +#[test] +fn concurrent_decodes_keep_profile_colors_when_transforms_are_reused() { + let cases: [(&[u8], [u8; 8]); 3] = [ + ( + include_bytes!("fixtures/p3.jxl"), + [255, 0, 0, 255, 255, 255, 255, 255], + ), + ( + include_bytes!("fixtures/gray_icc.jxl"), + [81, 81, 81, 255, 203, 203, 203, 255], + ), + ( + include_bytes!("fixtures/srgb_alpha.jxl"), + [128, 0, 0, 128, 0, 0, 255, 255], + ), + ]; + std::thread::scope(|scope| { + for _ in 0..4 { + scope.spawn(|| { + for _ in 0..8 { + for (data, expected) in cases { + let rgba = decode_srgb(data).unwrap(); + assert_eq!(rgba.pixels().as_flattened(), &expected); + } + } + }); + } + }); +} + #[test] fn tone_maps_hdr() { let rgba = decode_srgb(include_bytes!("fixtures/pq_grays.jxl")).unwrap();