PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Camera Raw: choose the demosaic method when a raw opens
Unemarse4e0a789cc99
diff --git a/apps/photocraft-web/src/web.rs b/apps/photocraft-web/src/web.rsindex 6fd362048..6eea63b49 100644--- a/apps/photocraft-web/src/web.rs+++ b/apps/photocraft-web/src/web.rs@@ -384,8 +384,8 @@ impl eframe::App for WebShell {fn services(inbox: Inbox, place_inbox: Inbox, cursor_pos: photocraft_ui_egui::CursorPosFn) -> Services {Services {screen_pick: screen_color_service(),- import: Some(Box::new(|name: &str, bytes: &[u8], max_svg_group_depth: usize| {- photocraft_io::import_with_svg_group_depth(name, bytes, max_svg_group_depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ import: Some(Box::new(|name: &str, bytes: &[u8], opts: &photocraft_io::ImportOptions| {+ photocraft_io::import_with_options(name, bytes, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})),export: Some(Box::new(|doc: &Document, path: &str, settings: &photocraft_ui_egui::ExportSettings| {photocraft_io::export(doc, path, &settings.io_options()).map(|r| (r.bytes, r.warnings)).map_err(|e| e.to_string())diff --git a/apps/photocraft/src/services.rs b/apps/photocraft/src/services.rsindex d4e7a0155..b15dede39 100644--- a/apps/photocraft/src/services.rs+++ b/apps/photocraft/src/services.rs@@ -494,9 +494,9 @@ pub fn native(automation: Option<photocraft_automation::AuthorizedWorkspace>) ->}) as photocraft_ui_egui::AutomationCommandFn});Services {- import: Some(Box::new(|name: &str, bytes: &[u8], max_svg_group_depth: usize| {+ import: Some(Box::new(|name: &str, bytes: &[u8], opts: &photocraft_io::ImportOptions| {crate::crash_guard::guard("Open", || {- photocraft_io::import_with_svg_group_depth(name, bytes, max_svg_group_depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ photocraft_io::import_with_options(name, bytes, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})})),export: Some(Box::new(|doc: &Document, path: &str, settings: &photocraft_ui_egui::ExportSettings| {diff --git a/crates/engine/src/file_cmds.rs b/crates/engine/src/file_cmds.rsindex f99aefcff..1be23c13f 100644--- a/crates/engine/src/file_cmds.rs+++ b/crates/engine/src/file_cmds.rs@@ -557,8 +557,8 @@ pub fn place_bytes(s: &mut Session, name: &str, bytes: Vec<u8>, linked: Option<Slet (cw, ch) = (d.doc.size.width as f64, d.doc.size.height as f64);let fmt = d.doc.pixel_format();let vector = photocraft_io::svg::is_svg(&bytes);- let max_svg_group_depth = s.prefs().file_handling.rasterize_svg_groups_deeper_than as usize;- let imported = photocraft_io::import_with_svg_group_depth(name, &bytes, max_svg_group_depth).map_err(|e| EngineError::Other(format!("{name}: {e}")))?;+ let opts = crate::jobs::import_options(s.prefs());+ let imported = photocraft_io::import_with_options(name, &bytes, &opts).map_err(|e| EngineError::Other(format!("{name}: {e}")))?;if imported.preview_only {return Err(EngineError::Other(format!("{name}: only this Affinity file's embedded preview could be read; open it with File › Open to see the warning, or export PSD or PNG from Affinity before using it here"diff --git a/crates/engine/src/jobs.rs b/crates/engine/src/jobs.rsindex b30e56da3..48a5ef247 100644--- a/crates/engine/src/jobs.rs+++ b/crates/engine/src/jobs.rs@@ -459,6 +459,14 @@ pub enum OpenSource {/// The command id open jobs report (there is no engine command: opening is the shell's).pub const OPEN_JOB: &str = "file.open";+/// The import settings files are opened and placed with.+pub fn import_options(prefs: &crate::prefs::Preferences) -> photocraft_io::ImportOptions {+ photocraft_io::ImportOptions {+ max_group_depth: prefs.file_handling.rasterize_svg_groups_deeper_than as usize,+ demosaic: prefs.raw_defaults.demosaic.method(),+ }+}+impl Session {/// Run the heavy part of inline (not background) job commands under `ctx`, so another thread/// can cancel them: a live preview whose parameters changed stops its stale computation@@ -485,7 +493,7 @@ impl Session {let label = format!("Opening {name}");let name_w = name.to_string();let name_a = name.to_string();- let max_svg_group_depth = self.prefs().file_handling.rasterize_svg_groups_deeper_than as usize;+ let opts = import_options(self.prefs());self.start_job(OPEN_JOB,json!({"name": name}),@@ -499,12 +507,12 @@ impl Session {};ctx.check()?;ctx.progress(0.02, "Decoding");- let imported = ctx- .stage(0.02, 0.95, "Decoding", |ctl| photocraft_io::import_with_svg_group_depth_and_interrupt(&name_w, &bytes, max_svg_group_depth, ctl))- .map_err(|e| match e {+ let imported = ctx.stage(0.02, 0.95, "Decoding", |ctl| photocraft_io::import_with_options_and_interrupt(&name_w, &bytes, &opts, ctl)).map_err(+ |e| match e {photocraft_io::IoError::Cancelled => EngineError::Cancelled,e => EngineError::Other(e.to_string()),- })?;+ },+ )?;ctx.progress(0.95, "Preparing layers");warm_layer_bounds(&imported.document, || ctx.check())?;Ok(imported)diff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rsindex 2c2507226..55ff4c3b9 100644--- a/crates/engine/src/prefs.rs+++ b/crates/engine/src/prefs.rs@@ -108,6 +108,12 @@ choice!(FontPreview { Off = "off", Small = "small", Medium = "medium", Large = "choice!(RawColorSpace { Srgb = "srgb", AdobeRgb = "adobeRgb", ProPhoto = "proPhoto", DisplayP3 = "displayP3" } default AdobeRgb);choice!(RawDepth { Eight = "8", Sixteen = "16" } default Sixteen);choice!(RawSharpen { None = "none", Screen = "screen", Glossy = "glossy", Matte = "matte" } default None);+choice!(+ /// How a raw file's colour filter array is filled in when it is developed: AHD+ /// (Hirakawa–Parks) keeps edges cleanest, Malvar–He–Cutler is sharp and fast, bilinear is the+ /// fastest and softest. Photoshop's Camera Raw has no such choice.+ RawDemosaic { Ahd = "ahd", Mhc = "mhc", Bilinear = "bilinear" } default Ahd+);impl Unit {/// Document pixels → this unit. `dpi` is the document resolution, `extent` the 100% length@@ -858,6 +864,19 @@ pub struct RawDefaults {/// Photoshop does; off develops it with the defaults straight away. Automation opens never/// show the dialog.pub open_in_camera_raw: bool,+ /// The demosaic method raws are developed with; the open-time Camera Raw dialog starts from it.+ pub demosaic: RawDemosaic,+}++impl RawDemosaic {+ /// The developer's method.+ pub fn method(self) -> photocraft_io::raw::Demosaic {+ match self {+ RawDemosaic::Ahd => photocraft_io::raw::Demosaic::Ahd,+ RawDemosaic::Mhc => photocraft_io::raw::Demosaic::Mhc,+ RawDemosaic::Bilinear => photocraft_io::raw::Demosaic::Bilinear,+ }+ }}impl Default for RawDefaults {@@ -870,6 +889,7 @@ impl Default for RawDefaults {open_as_smart_object: false,apply_auto_tone: false,open_in_camera_raw: true,+ demosaic: RawDemosaic::Ahd,}}}@@ -1095,6 +1115,7 @@ pub fn choices(path: &str) -> Option<&'static [&'static str]> {"rawDefaults.colorSpace" => RawColorSpace::NAMES,"rawDefaults.bitDepth" => RawDepth::NAMES,"rawDefaults.sharpenFor" => RawSharpen::NAMES,+ "rawDefaults.demosaic" => RawDemosaic::NAMES,"performance.gpuBackend" => GpuBackend::NAMES,"performance.linuxDisplayServer" => LinuxDisplayServer::NAMES,"performance.renderingMode" => RenderingMode::NAMES,diff --git a/crates/io/src/lib.rs b/crates/io/src/lib.rsindex 3543cd359..f31af4541 100644--- a/crates/io/src/lib.rs+++ b/crates/io/src/lib.rs@@ -266,14 +266,39 @@ pub fn import_with_svg_group_depth_and_interrupt(max_group_depth: usize,ctl: &photocraft_raster::Interrupt,) -> Result<ImportResult, IoError> {+ import_with_options_and_interrupt(name, bytes, &ImportOptions { max_group_depth, ..Default::default() }, ctl)+}++/// The user's settings that shape an import.+#[derive(Clone, Copy, Debug, PartialEq)]+pub struct ImportOptions {+ /// SVG groups nested deeper than this are rasterised.+ pub max_group_depth: usize,+ /// The demosaic method camera raws are developed with.+ pub demosaic: raw::Demosaic,+}++impl Default for ImportOptions {+ fn default() -> Self {+ ImportOptions { max_group_depth: photocraft_doc::MAX_GROUP_DEPTH, demosaic: raw::Demosaic::default() }+ }+}++/// [`import`] with the user's import settings.+pub fn import_with_options(name: &str, bytes: &[u8], opts: &ImportOptions) -> Result<ImportResult, IoError> {+ import_with_options_and_interrupt(name, bytes, opts, &photocraft_raster::Interrupt::NONE)+}++/// [`import_with`] with the user's import settings.+pub fn import_with_options_and_interrupt(name: &str, bytes: &[u8], opts: &ImportOptions, ctl: &photocraft_raster::Interrupt) -> Result<ImportResult, IoError> {ctl.check().map_err(|_| IoError::Cancelled)?;- let r = import_stages(name, bytes, ctl, max_group_depth)?;+ let r = import_stages(name, bytes, ctl, opts)?;ctl.check().map_err(|_| IoError::Cancelled)?;ctl.progress(1.0);Ok(r)}-fn import_stages(name: &str, bytes: &[u8], ctl: &photocraft_raster::Interrupt, max_group_depth: usize) -> Result<ImportResult, IoError> {+fn import_stages(name: &str, bytes: &[u8], ctl: &photocraft_raster::Interrupt, opts: &ImportOptions) -> Result<ImportResult, IoError> {// A declared native extension must reach its loader so malformed bundles retain format errors.if has_extension(name, photocraft_format::EXTENSION) || photocraft_format::is_pcraft(bytes) {return Ok(ImportResult { document: photocraft_format::load_from_bytes(bytes)?, warnings: Vec::new(), source_read_only: false, preview_only: false });@@ -310,10 +335,10 @@ fn import_stages(name: &str, bytes: &[u8], ctl: &photocraft_raster::Interrupt, mreturn pdn::import(name, bytes, ctl);}if raw::is_raw(bytes) {- return raw::import_raw(name, bytes);+ return raw::import_raw_demosaic(name, bytes, opts.demosaic);}if is_svg_input(name, bytes) {- return svg::import_svg_with_group_depth(name, bytes, max_group_depth);+ return svg::import_svg_with_group_depth(name, bytes, opts.max_group_depth);}flat::import_flat(name, bytes)}diff --git a/crates/io/src/raw.rs b/crates/io/src/raw.rsindex 008173839..f03c503c9 100644--- a/crates/io/src/raw.rs+++ b/crates/io/src/raw.rs@@ -14,6 +14,7 @@ use std::sync::Arc;use photocraft_cms::{Builtin, Intent, Profile, Transform};use photocraft_codecs::{self as codecs, ChannelLayout, Format, Image, SampleType};+pub use photocraft_raw::Demosaic;use photocraft_raw::{CameraLook, DevelopOptions, Limits, PreviewColorSpace, RawError, Reference, Sensor, WhiteBalance};pub use photocraft_raw::{Tone, retone};@@ -44,7 +45,7 @@ fn upright_preview(raw: &[u8], jpeg: &[u8]) -> Result<Image, IoError> {/// Camera Raw's Temperature, Tint, Exposure, Shadows, Highlights, Clarity, Texture and Dehaze,/// applied while developing the sensor data (the open-time Camera Raw dialog) instead of to the-/// developed RGB pixels.+/// developed RGB pixels, and the demosaic method.#[derive(Clone, Copy, Debug, Default, PartialEq)]pub struct RawTuning {/// −100…100, as `photocraft_algo::camera_raw::CameraRaw::temperature`.@@ -53,6 +54,7 @@ pub struct RawTuning {pub tint: f32,/// EV, as `CameraRaw::exposure`.pub exposure: f32,+ pub demosaic: Demosaic,/// −100…100, as `CameraRaw::shadows`: in linear light before the tone curve, as Camera Raw/// does for raw files ([`photocraft_raw::Tone`]).pub shadows: f32,@@ -90,7 +92,7 @@ pub fn import_raw_tuned(name: &str, bytes: &[u8], tuning: &RawTuning) -> Result<// The colour rendering the default open used (a look fitted to the camera's JPEG for files// without colour calibration), so re-developing changes only what the sliders change.let camera_look = default_look(bytes, &sensor);- let mut opts = DevelopOptions { limits: limits(), exposure, tone, camera_look, ..Default::default() };+ let mut opts = DevelopOptions { limits: limits(), exposure, demosaic: tuning.demosaic, tone, camera_look, ..Default::default() };let wb_applied = match sensor.camera_wb {Some(m) => {let g = wb_gains(tuning.temperature, tuning.tint);@@ -110,7 +112,7 @@ pub fn import_raw_tuned(name: &str, bytes: &[u8], tuning: &RawTuning) -> Result<.filter(|(_, v)| *v != 0.0).map(|(k, v)| format!(", {k} {v:+.0}")).collect::<String>();- let summary = format!("developed in Camera Raw (exposure {:+.2} EV{tone}, {wb})", tuning.exposure);+ let summary = format!("developed in Camera Raw (exposure {:+.2} EV{tone}, {wb}, {} demosaic)", tuning.exposure, tuning.demosaic.id());Ok((developed_document(name, format, dev, &summary)?, wb_applied))}@@ -180,7 +182,12 @@ fn developed_document(name: &str, format: &str, dev: photocraft_raw::Developed,/// Develops a raw file with the default settings.pub fn import_raw(name: &str, bytes: &[u8]) -> Result<ImportResult, IoError> {- import_raw_with(name, bytes, &DevelopOptions { limits: limits(), ..Default::default() })+ import_raw_demosaic(name, bytes, Demosaic::default())+}++/// Develops a raw file with the default settings and the `demosaic` method.+pub fn import_raw_demosaic(name: &str, bytes: &[u8], demosaic: Demosaic) -> Result<ImportResult, IoError> {+ import_raw_with(name, bytes, &DevelopOptions { limits: limits(), demosaic, ..Default::default() })}/// Smallest preview long edge preferred for the colour fit (a smaller preview decodes faster;diff --git a/crates/ui-egui/examples/snapshot.rs b/crates/ui-egui/examples/snapshot.rsindex 0d227255d..787e97c4d 100644--- a/crates/ui-egui/examples/snapshot.rs+++ b/crates/ui-egui/examples/snapshot.rs@@ -41,8 +41,8 @@ fn main() {arg(&args, "--script").map(|s| serde_json::from_str::<Vec<(String, Value)>>(&s).expect("--script must be [[method, params], …]")).unwrap_or_default();let services = Services {- import: Some(Box::new(|name: &str, bytes: &[u8], depth: usize| {- photocraft_io::import_with_svg_group_depth(name, bytes, depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ import: Some(Box::new(|name: &str, bytes: &[u8], opts: &photocraft_io::ImportOptions| {+ photocraft_io::import_with_options(name, bytes, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})),export: Some(Box::new(|doc: &photocraft_doc::Document, path: &str, settings: &photocraft_ui_egui::ExportSettings| {let mut opts = photocraft_io::ExportOptions::default();diff --git a/crates/ui-egui/src/actions.rs b/crates/ui-egui/src/actions.rsindex a5c2f15e9..74e3960c2 100644--- a/crates/ui-egui/src/actions.rs+++ b/crates/ui-egui/src/actions.rs@@ -1390,8 +1390,8 @@ mod tests {/// An app with the real importer/exporter and writer whose Save dialogs answer `answers`.fn disk_app(answers: Vec<Option<crate::file_dialog::FileDialogAnswer>>) -> PhotocraftApp {let services = crate::Services {- import: Some(Box::new(|name, bytes, depth| {- photocraft_io::import_with_svg_group_depth(name, bytes, depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ import: Some(Box::new(|name, bytes, opts| {+ photocraft_io::import_with_options(name, bytes, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})),export: Some(Box::new(|doc, path, _| {photocraft_io::export(doc, path, &Default::default()).map(|r| (r.bytes, r.warnings)).map_err(|e| e.to_string())diff --git a/crates/ui-egui/src/camera_raw_ui.rs b/crates/ui-egui/src/camera_raw_ui.rsindex d2f78a35c..869f4ba2c 100644--- a/crates/ui-egui/src/camera_raw_ui.rs+++ b/crates/ui-egui/src/camera_raw_ui.rs@@ -88,7 +88,7 @@ impl CameraRawDialog {Target::SmartFilter(index) => Some(index),Target::NewFilter | Target::OpenRaw => None,});- result["openingRaw"] = json!(self.raw_open.as_ref().map(|r| json!({"name": r.name, "path": r.path})));+ result["openingRaw"] = json!(self.raw_open.as_ref().map(|r| json!({"name": r.name, "path": r.path, "demosaic": r.demosaic.id()})));result["view"] = json!(navigation);result["sourceSize"] = json!([self.full_w, self.full_h]);result["previewApproximate"] = json!(!self.detail.ready && (self.pw != self.full_w || self.ph != self.full_h));@@ -194,10 +194,10 @@ enum Target {/// A raw file opened interactively, shown in Camera Raw before it is kept (as Photoshop opens/// raws in Adobe Camera Raw first). The document is already developed with the defaults; Open-/// re-develops it when Temperature, Tint, Exposure, Shadows, Highlights, Clarity, Texture or-/// Dehaze changed (those act on the sensor data, see [`photocraft_io::raw::import_raw_tuned`])-/// and applies the other settings as one Camera Raw step, then marks the document unmodified.-/// Cancel closes it.+/// re-develops it when Temperature, Tint, Exposure, Shadows, Highlights, Clarity, Texture,+/// Dehaze or the demosaic method changed (those act on the sensor data, see+/// [`photocraft_io::raw::import_raw_tuned`]) and applies the other settings as one Camera Raw+/// step, then marks the document unmodified. Cancel closes it.#[derive(Clone, Debug)]pub struct RawOpen {pub document: photocraft_doc::DocId,@@ -205,6 +205,10 @@ pub struct RawOpen {pub path: Option<String>,/// The file, when it was opened from bytes (no path to read it again from).pub bytes: Option<std::sync::Arc<Vec<u8>>>,+ /// The demosaic method the open developed it with.+ pub developed_with: photocraft_io::raw::Demosaic,+ /// The method chosen in the dialog: Open re-develops when it differs from `developed_with`.+ pub demosaic: photocraft_io::raw::Demosaic,}/// Should an interactive open of `name` show the open-time Camera Raw dialog? `warnings` are@@ -222,11 +226,15 @@ pub fn without_develop_note(warnings: &[String]) -> Vec<String> {/// Queues the open-time dialog for the active document (shown on the next frame).pub fn queue_open_dialog(app: &mut PhotocraftApp, name: &str, path: Option<&str>, bytes: Option<&[u8]>) {if let Some(st) = app.session.active() {+ // The open developed it with the preference's method (`jobs::import_options`).+ let method = app.session.prefs().raw_defaults.demosaic.method();app.pending_raw_open = Some(RawOpen {document: st.doc.id,name: name.to_string(),path: path.map(str::to_string),bytes: bytes.map(|b| std::sync::Arc::new(b.to_vec())),+ developed_with: method,+ demosaic: method,});}}@@ -301,12 +309,15 @@ fn commit_open_raw(app: &mut PhotocraftApp, params: &CameraRaw, raw: &RawOpen) -temperature: params.temperature,tint: params.tint,exposure: params.exposure,+ demosaic: raw.demosaic,shadows: params.shadows,highlights: params.highlights,clarity: params.clarity,texture: params.texture,dehaze: params.dehaze,};+ // The open itself: the default settings, developed with the method it was opened with.+ let as_opened = photocraft_io::raw::RawTuning { demosaic: raw.developed_with, ..Default::default() };// Without the file the raw-stage settings stay RGB adjustments, like the filter's.let source = match (&raw.bytes, &raw.path) {(Some(b), _) => Some(photocraft_engine::jobs::OpenSource::Bytes(b.clone())),@@ -314,7 +325,7 @@ fn commit_open_raw(app: &mut PhotocraftApp, params: &CameraRaw, raw: &RawOpen) -(None, Some(p)) => Some(photocraft_engine::jobs::OpenSource::Path(p.clone())),_ => None,};- let Some(source) = source.filter(|_| tuning != photocraft_io::raw::RawTuning::default()) else {+ let Some(source) = source.filter(|_| tuning != as_opened) else {return finish_open_raw(app, index, params.clone(), None, Some(raw));};app.session.set_active(index);@@ -683,7 +694,7 @@ pub fn menu(app: &mut PhotocraftApp, ctx: &egui::Context, id: &str, params: &Val};for (key, value) in fields {match key.as_str() {- "set" | "scope" | "view" => {}+ "set" | "scope" | "view" | "demosaic" => {}"before" | "commit" | "cancel" | "saveSettings" | "loadSettings" | "undo" | "redo" if value.is_boolean() => {}"before" | "commit" | "cancel" | "saveSettings" | "loadSettings" | "undo" | "redo" => {return Some(Err(format!("Camera Raw {key} must be a boolean")));@@ -757,7 +768,18 @@ fn menu_update(app: &mut PhotocraftApp, ctx: &egui::Context, ui: &Value) -> Opti},None => None,};+ let demosaic = match ui.get("demosaic") {+ None => None,+ Some(_) if d.raw_open.is_none() => return Some(Err("demosaic applies only while a raw file opens".into())),+ Some(v) => match v.as_str().and_then(photocraft_io::raw::Demosaic::from_id) {+ Some(m) => Some(m),+ None => return Some(Err("demosaic must be ahd, mhc or bilinear".into())),+ },+ };let d = app.camera_raw.as_mut()?;+ if let (Some(m), Some(raw)) = (demosaic, d.raw_open.as_mut()) {+ raw.demosaic = m;+ }if let Some(view) = navigation {app.ui.camera_raw_preview = view;}@@ -920,6 +942,25 @@ fn commit(app: &mut PhotocraftApp) -> Result<Value, String> {Ok(result)}+/// The open-time demosaic choice (at the top of Detail). Photoshop's Camera Raw picks one method+/// for every file; here it is the user's. Open re-develops with it; the preview keeps the method+/// the file was opened with (the differences are finer than the preview's pixels).+fn demosaic_row(ui: &mut egui::Ui, m: &mut photocraft_io::raw::Demosaic) {+ use photocraft_io::raw::Demosaic;+ ui.horizontal(|ui| {+ ui.label(crate::i18n::tr_ctx(crate::i18n::current(), "cameraRaw", "Demosaic")).on_hover_text(tl!(+ "How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with."+ ));+ let options = [+ (Demosaic::Ahd, "AHD (adaptive homogeneity)", "Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest."),+ (Demosaic::Mhc, "Malvar–He–Cutler", "Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail."),+ (Demosaic::Bilinear, "Bilinear", "The fastest and the softest, with colour fringing on fine detail."),+ ];+ widgets::dropdown_with_tooltips(ui, "camera-raw-demosaic", m, &options, 180.0);+ });+ ui.add_space(4.0);+}+fn temp_stops() -> Vec<Color32> {vec![Color32::from_rgb(70, 120, 230), Color32::from_rgb(200, 200, 200), Color32::from_rgb(235, 200, 60)]}@@ -1229,6 +1270,9 @@ fn draw(app: &mut PhotocraftApp, ctx: &egui::Context, own_window: bool) {row(ui, &mut dirty, "Balance", &mut p.grade_balance, -100.0..=100.0, None);});section(ui, "Detail", false, |ui| {+ if let Some(raw) = d.raw_open.as_mut() {+ demosaic_row(ui, &mut raw.demosaic);+ }widgets::section_label(ui, tl!("Sharpening"));row(ui, &mut dirty, "Amount", &mut p.sharpen_amount, 0.0..=150.0, None);row(ui, &mut dirty, "Radius", &mut p.sharpen_radius, 0.5..=3.0, None);@@ -1490,8 +1534,8 @@ mod tests {fn raw_app() -> (PhotocraftApp, Vec<u8>) {use photocraft_raw::testgen::{DngSpec, mosaic, scene};let services = crate::Services {- import: Some(Box::new(|name: &str, b: &[u8], depth: usize| {- photocraft_io::import_with_svg_group_depth(name, b, depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ import: Some(Box::new(|name: &str, b: &[u8], opts: &photocraft_io::ImportOptions| {+ photocraft_io::import_with_options(name, b, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})),..Default::default()};@@ -1534,6 +1578,47 @@ mod tests {assert!(mean_red(&app) > before + 0.05, "{before} → {}", mean_red(&app));}+ fn pixels(app: &PhotocraftApp) -> Vec<f32> {+ let st = app.session.active().unwrap();+ let s = st.doc.layer(st.active_layer.unwrap()).unwrap().surface().unwrap();+ (0..32).flat_map(|y| (0..48).map(move |x| (x, y))).flat_map(|(x, y)| s.rgba(x, y)).collect()+ }++ #[test]+ fn the_demosaic_method_is_chosen_at_open() {+ let (mut app, dng) = raw_app();+ let ctx = egui::Context::default();+ app.open_bytes("IMG_0002.dng", &dng).unwrap();+ let ahd = pixels(&app);+ let raw = app.pending_raw_open.take().unwrap();+ open_raw(&mut app, &ctx, raw).unwrap();+ let d = menu(&mut app, &ctx, "filter.cameraRaw", &json!({"ui": {"demosaic": "bilinear"}})).unwrap().unwrap();+ assert_eq!(d["openingRaw"]["demosaic"], "bilinear");+ assert!(menu(&mut app, &ctx, "filter.cameraRaw", &json!({"ui": {"demosaic": "amaze"}})).unwrap().is_err());+ let r = menu(&mut app, &ctx, "filter.cameraRaw", &json!({"ui": {"commit": true}})).unwrap().unwrap();+ assert_eq!(r["redeveloped"], true, "another method re-develops: {r}");+ assert!(r.get("filter").is_none(), "nothing else to apply: {r}");+ let bilinear = pixels(&app);+ assert!(ahd.iter().zip(&bilinear).any(|(a, b)| (a - b).abs() > 1e-3), "bilinear differs from AHD");+ let st = app.session.active().unwrap();+ assert_eq!(st.saved_revision, st.revision);++ // The preference sets the method of the open itself; Open with it changes nothing.+ app.run("prefs.set", json!({"path": "rawDefaults.demosaic", "value": "bilinear"})).unwrap();+ app.open_bytes("IMG_0003.dng", &dng).unwrap();+ assert_eq!(pixels(&app), bilinear, "developed with the preference's method");+ let raw = app.pending_raw_open.take().unwrap();+ open_raw(&mut app, &ctx, raw).unwrap();+ let d = app.camera_raw.as_ref().unwrap().describe(&app.ui.camera_raw_scope, &app.ui.camera_raw_preview);+ assert_eq!(d["openingRaw"]["demosaic"], "bilinear");+ let r = menu(&mut app, &ctx, "filter.cameraRaw", &json!({"ui": {"commit": true}})).unwrap().unwrap();+ assert_eq!(r["redeveloped"], false, "{r}");++ // Only the open-time dialog has the choice.+ menu(&mut app, &ctx, "filter.cameraRaw", &json!({})).unwrap().unwrap();+ assert!(menu(&mut app, &ctx, "filter.cameraRaw", &json!({"ui": {"demosaic": "ahd"}})).unwrap().is_err());+ }+#[test]fn shadows_of_a_raw_open_act_on_the_raw_data_and_the_preview_shows_it() {let (mut app, dng) = raw_app();@@ -1634,7 +1719,21 @@ mod tests {app.open_bytes("c.dng", &dng).unwrap();assert!(app.pending_raw_open.is_none());// A non-raw never queues the dialog; a closed document is an error, not a panic.- assert!(open_raw(&mut app, &ctx, RawOpen { document: photocraft_doc::DocId(u64::MAX), name: "x".into(), path: None, bytes: None }).is_err());+ assert!(+ open_raw(+ &mut app,+ &ctx,+ RawOpen {+ document: photocraft_doc::DocId(u64::MAX),+ name: "x".into(),+ path: None,+ bytes: None,+ developed_with: Default::default(),+ demosaic: Default::default()+ }+ )+ .is_err()+ );}#[test]diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rsindex 8cddc60b2..3c325d24c 100644--- a/crates/ui-egui/src/control.rs+++ b/crates/ui-egui/src/control.rs@@ -1431,8 +1431,8 @@ mod tests {let dng = spec.build();for finish in ["commit", "cancel"] {let services = crate::Services {- import: Some(Box::new(|name, bytes, depth| {- photocraft_io::import_with_svg_group_depth(name, bytes, depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ import: Some(Box::new(|name, bytes, opts| {+ photocraft_io::import_with_options(name, bytes, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})),..Default::default()};@@ -2456,7 +2456,7 @@ mod tests {let written: Rc<RefCell<Vec<String>>> = Rc::default();let w = written.clone();let services = crate::Services {- import: Some(Box::new(|name: &str, _b: &[u8], _depth: usize| {+ import: Some(Box::new(|name: &str, _b: &[u8], _opts: &photocraft_io::ImportOptions| {Ok((Document::new(name, Size::new(4, 4), ColorMode::Rgb, SampleType::U8), vec!["Adjustment layer flattened".to_string()]))})),export: Some(Box::new(|_d: &Document, _p: &str, _s: &crate::ExportSettings| Ok((b"out".to_vec(), vec!["Layers were flattened".to_string()])))),@@ -2520,7 +2520,7 @@ mod tests {Err(format!("corrupt bundle: {path}"))}})),- import: Some(Box::new(|name: &str, _b: &[u8], _depth: usize| {+ import: Some(Box::new(|name: &str, _b: &[u8], _opts: &photocraft_io::ImportOptions| {Ok((Document::new(name, photocraft_doc::Size::new(4, 4), photocraft_doc::ColorMode::Rgb, photocraft_doc::SampleType::U8), Vec::new()))})),automation_read: Some(Box::new(|path: &str| {diff --git a/crates/ui-egui/src/file_open/tests.rs b/crates/ui-egui/src/file_open/tests.rsindex 00db3ef96..c139bed9c 100644--- a/crates/ui-egui/src/file_open/tests.rs+++ b/crates/ui-egui/src/file_open/tests.rs@@ -18,7 +18,7 @@ fn app_with(answers: Vec<Option<FileDialogAnswer>>) -> (PhotocraftApp, Written)let written: Written = Rc::default();let w = written.clone();let services = Services {- import: Some(Box::new(|name: &str, bytes: &[u8], _depth: usize| {+ import: Some(Box::new(|name: &str, bytes: &[u8], _opts: &photocraft_io::ImportOptions| {if bytes == b"bad" {return Err("not an image".into());}@@ -935,7 +935,7 @@ fn opening_type_in_a_missing_font_warns() {let (with_missing, installed) = (doc_with_type(Some(MISSING)), doc_with_type(None));let already = warning.clone();let services = Services {- import: Some(Box::new(move |name: &str, _bytes: &[u8], _depth: usize| {+ import: Some(Box::new(move |name: &str, _bytes: &[u8], _opts: &photocraft_io::ImportOptions| {Ok(match name {"installed.psd" => (installed.clone(), Vec::new()),"warned.psd" => (with_missing.clone(), vec![already.clone()]),diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsvindex 6175183cb..8499cb6c4 100644--- a/crates/ui-egui/src/i18n/cs.tsv+++ b/crates/ui-egui/src/i18n/cs.tsv@@ -3838,3 +3838,10 @@ navigator Zoom ZvětšeníIncrease Brush Size Zvětšit velikost štětceDecrease Brush Hardness Snížit tvrdost štětceIncrease Brush Hardness Zvýšit tvrdost štětce+ Demosaic Demozaikování+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Jak se doplňuje mozaika barevného filtru fotoaparátu. Použije se při otevření souboru; náhled ukazuje metodu, se kterou byl otevřen.+ AHD (adaptive homogeneity) AHD (adaptivní homogenita)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: nejčistší hrany a nejméně barevných lemů, nejpomalejší.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Interpolace s korekcí gradientu: ostrá a rychlá, s mírnými barevnými lemy v jemných detailech.+ The fastest and the softest, with colour fringing on fine detail. Nejrychlejší a nejměkčí, s barevnými lemy v jemných detailech.diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsvindex 5fbbceb44..db9c58b51 100644--- a/crates/ui-egui/src/i18n/de.tsv+++ b/crates/ui-egui/src/i18n/de.tsv@@ -3230,3 +3230,10 @@ curves Smooth GlättenGPU Memory (MB, 0 = Automatic) GPU-Speicher (MB, 0 = Automatisch){name} was changed by another app after it was opened or saved here. {name} wurde von einer anderen App geändert, nachdem es hier geöffnet oder gespeichert wurde.Replace it with this document, or cancel and use File › Save As to keep both. Ersetze die Datei durch dieses Dokument oder brich ab und nutze Datei › Speichern unter, um beide zu behalten.+ Demosaic Demosaicing+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Wie das Farbfiltermosaik der Kamera aufgefüllt wird. Es wird beim Öffnen der Datei angewendet; die Vorschau zeigt die Methode, mit der sie geöffnet wurde.+ AHD (adaptive homogeneity) AHD (adaptive Homogenität)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: die saubersten Kanten und die wenigsten Farbsäume, am langsamsten.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Gradientenkorrigierte Interpolation: scharf und schnell, mit etwas Farbsäumen an feinen Details.+ The fastest and the softest, with colour fringing on fine detail. Am schnellsten und weichsten, mit Farbsäumen an feinen Details.diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsvindex d21c3ba6e..f6ec29ec5 100644--- a/crates/ui-egui/src/i18n/el.tsv+++ b/crates/ui-egui/src/i18n/el.tsv@@ -3930,3 +3930,10 @@ curves Smooth ΕξομάλυνσηIncrease Brush Size Αύξηση μεγέθους πινέλουDecrease Brush Hardness Μείωση σκληρότητας πινέλουIncrease Brush Hardness Αύξηση σκληρότητας πινέλου+ Demosaic Αποψηφιδοποίηση+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Πώς συμπληρώνεται το ψηφιδωτό του χρωματικού φίλτρου της κάμερας. Εφαρμόζεται όταν ανοίγει το αρχείο· η προεπισκόπηση δείχνει τη μέθοδο με την οποία άνοιξε.+ AHD (adaptive homogeneity) AHD (προσαρμοστική ομοιογένεια)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: οι πιο καθαρές ακμές και τα λιγότερα χρωματικά περιθώρια, η πιο αργή.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Παρεμβολή με διόρθωση κλίσης: ευκρινής και γρήγορη, με λίγα χρωματικά περιθώρια στις λεπτές λεπτομέρειες.+ The fastest and the softest, with colour fringing on fine detail. Η πιο γρήγορη και η πιο μαλακή, με χρωματικά περιθώρια στις λεπτές λεπτομέρειες.diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsvindex 4956fcd97..6070bba36 100644--- a/crates/ui-egui/src/i18n/es.tsv+++ b/crates/ui-egui/src/i18n/es.tsv@@ -4192,3 +4192,10 @@ navigator Zoom ZoomIncrease Brush Size Aumentar tamaño del pincelDecrease Brush Hardness Reducir dureza del pincelIncrease Brush Hardness Aumentar dureza del pincel+ Demosaic Demosaico+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Cómo se completa el mosaico del filtro de color de la cámara. Se aplica al abrir el archivo; la vista previa muestra el método con el que se abrió.+ AHD (adaptive homogeneity) AHD (homogeneidad adaptativa)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: los bordes más limpios y el menor halo de color; el más lento.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Interpolación con corrección de gradiente: nítida y rápida, con algo de halo de color en el detalle fino.+ The fastest and the softest, with colour fringing on fine detail. El más rápido y el más suave, con halo de color en el detalle fino.diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsvindex 62b2e8ea2..4cecef543 100644--- a/crates/ui-egui/src/i18n/fr.tsv+++ b/crates/ui-egui/src/i18n/fr.tsv@@ -3238,3 +3238,10 @@ curves Smooth LisserIncrease Brush Size Augmenter la taille du pinceauDecrease Brush Hardness Réduire la dureté du pinceauIncrease Brush Hardness Augmenter la dureté du pinceau+ Demosaic Dématriçage+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Comment la mosaïque du filtre couleur de l'appareil est complétée. Appliqué à l'ouverture du fichier ; l'aperçu montre la méthode avec laquelle il a été ouvert.+ AHD (adaptive homogeneity) AHD (homogénéité adaptative)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks : les bords les plus nets et le moins de franges colorées ; le plus lent.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Interpolation corrigée par gradient : nette et rapide, avec quelques franges colorées sur les détails fins.+ The fastest and the softest, with colour fringing on fine detail. Le plus rapide et le plus doux, avec des franges colorées sur les détails fins.diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsvindex a52cb5fdb..1bad45e36 100644--- a/crates/ui-egui/src/i18n/hu.tsv+++ b/crates/ui-egui/src/i18n/hu.tsv@@ -4149,3 +4149,10 @@ cameraRaw Yellow SárgaIncrease Brush Size Ecsetméret növeléseDecrease Brush Hardness Ecsetkeménység csökkentéseIncrease Brush Hardness Ecsetkeménység növelése+ Demosaic Demozaikolás+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Hogyan tölti ki a program a kamera színszűrő-mozaikját. A fájl megnyitásakor érvényesül; az előnézet a megnyitáskor használt módszert mutatja.+ AHD (adaptive homogeneity) AHD (adaptív homogenitás)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: a legtisztább élek és a legkevesebb színes szegély, a leglassabb.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Gradienskorrigált interpoláció: éles és gyors, apró részleteken némi színes szegéllyel.+ The fastest and the softest, with colour fringing on fine detail. A leggyorsabb és a leglágyabb, apró részleteken színes szegéllyel.diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsvindex 14e65b2b7..9f1d7c61d 100644--- a/crates/ui-egui/src/i18n/id.tsv+++ b/crates/ui-egui/src/i18n/id.tsv@@ -3225,3 +3225,10 @@ curves Smooth HaluskanIncrease Brush Size Perbesar ukuran kuasDecrease Brush Hardness Kurangi kekerasan kuasIncrease Brush Hardness Tambah kekerasan kuas+ Demosaic Demosaik+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Cara mosaik filter warna kamera diisi. Diterapkan saat berkas dibuka; pratinjau menampilkan metode yang dipakai saat dibuka.+ AHD (adaptive homogeneity) AHD (homogenitas adaptif)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: tepi paling bersih dan pinggiran warna paling sedikit, paling lambat.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Interpolasi terkoreksi gradien: tajam dan cepat, dengan sedikit pinggiran warna pada detail halus.+ The fastest and the softest, with colour fringing on fine detail. Paling cepat dan paling lembut, dengan pinggiran warna pada detail halus.diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsvindex 857cc66d9..02e1fd9fb 100644--- a/crates/ui-egui/src/i18n/it.tsv+++ b/crates/ui-egui/src/i18n/it.tsv@@ -4347,3 +4347,10 @@ shape Appearance AspettoGPU Memory (MB, 0 = Automatic) Memoria GPU (MB, 0 = Automatico){name} was changed by another app after it was opened or saved here. {name} è stato modificato da un'altra app dopo essere stato aperto o salvato qui.Replace it with this document, or cancel and use File › Save As to keep both. Sostituiscilo con questo documento, oppure annulla e usa File › Salva con nome per tenerli entrambi.+ Demosaic Demosaicizzazione+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Come viene completato il mosaico del filtro colore della fotocamera. Si applica all'apertura del file; l'anteprima mostra il metodo con cui è stato aperto.+ AHD (adaptive homogeneity) AHD (omogeneità adattiva)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: i bordi più puliti e le minori frange di colore, il più lento.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Interpolazione con correzione del gradiente: nitida e veloce, con qualche frangia di colore nei dettagli fini.+ The fastest and the softest, with colour fringing on fine detail. Il più veloce e il più morbido, con frange di colore nei dettagli fini.diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsvindex b14f5c119..96df27a9f 100644--- a/crates/ui-egui/src/i18n/ja.tsv+++ b/crates/ui-egui/src/i18n/ja.tsv@@ -3907,3 +3907,10 @@ curves Smooth スムーズIncrease Brush Size ブラシサイズを大きくDecrease Brush Hardness ブラシの硬さを下げるIncrease Brush Hardness ブラシの硬さを上げる+ Demosaic デモザイク+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. カメラのカラーフィルター配列をどのように補間するか。ファイルを開くときに適用されます。プレビューは開いたときの方式で表示されます。+ AHD (adaptive homogeneity) AHD(適応的均質性)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks:エッジが最もきれいで色にじみが最も少ないが、最も遅い。+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. 勾配補正補間:シャープで高速だが、細部に多少の色にじみが出る。+ The fastest and the softest, with colour fringing on fine detail. 最も高速で最も柔らかく、細部に色にじみが出る。diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsvindex ce06b65cd..6ec3e9ace 100644--- a/crates/ui-egui/src/i18n/ko.tsv+++ b/crates/ui-egui/src/i18n/ko.tsv@@ -3409,3 +3409,10 @@ curves Smooth 매끄럽게Increase Brush Size 브러시 크기 늘리기Decrease Brush Hardness 브러시 경도 줄이기Increase Brush Hardness 브러시 경도 늘리기+ Demosaic 디모자이크+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. 카메라 컬러 필터 모자이크를 채우는 방법입니다. 파일을 열 때 적용되며, 미리 보기는 파일을 연 방식으로 표시됩니다.+ AHD (adaptive homogeneity) AHD (적응형 균질성)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: 가장 깨끗한 가장자리와 가장 적은 색 번짐, 가장 느림.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. 기울기 보정 보간: 선명하고 빠르지만 미세한 디테일에 약간의 색 번짐이 있음.+ The fastest and the softest, with colour fringing on fine detail. 가장 빠르고 가장 부드러우며, 미세한 디테일에 색 번짐이 있음.diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsvindex 394aaecbb..d260403a4 100644--- a/crates/ui-egui/src/i18n/nl.tsv+++ b/crates/ui-egui/src/i18n/nl.tsv@@ -3990,3 +3990,10 @@ curves Smooth Vloeiend makenIncrease Brush Size Penseelgrootte vergrotenDecrease Brush Hardness Penseelhardheid verlagenIncrease Brush Hardness Penseelhardheid verhogen+ Demosaic Demosaicing+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Hoe het kleurfiltermozaïek van de camera wordt ingevuld. Wordt toegepast bij het openen van het bestand; de voorvertoning toont de methode waarmee het is geopend.+ AHD (adaptive homogeneity) AHD (adaptieve homogeniteit)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: de schoonste randen en de minste kleurranden, het traagst.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Gradiëntgecorrigeerde interpolatie: scherp en snel, met wat kleurranden in fijne details.+ The fastest and the softest, with colour fringing on fine detail. Het snelst en het zachtst, met kleurranden in fijne details.diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsvindex 660e93bbb..2d529fa11 100644--- a/crates/ui-egui/src/i18n/pl.tsv+++ b/crates/ui-egui/src/i18n/pl.tsv@@ -3829,3 +3829,10 @@ curves Smooth WygładźIncrease Brush Size Zwiększ rozmiar pędzlaDecrease Brush Hardness Zmniejsz twardość pędzlaIncrease Brush Hardness Zwiększ twardość pędzla+ Demosaic Demozaikowanie+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Sposób uzupełniania mozaiki filtra barwnego aparatu. Stosowany przy otwieraniu pliku; podgląd pokazuje metodę, z którą plik został otwarty.+ AHD (adaptive homogeneity) AHD (adaptacyjna jednorodność)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: najczystsze krawędzie i najmniej barwnych obwódek, najwolniejsza.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Interpolacja z korekcją gradientu: ostra i szybka, z niewielkimi barwnymi obwódkami na drobnych szczegółach.+ The fastest and the softest, with colour fringing on fine detail. Najszybsza i najmiększa, z barwnymi obwódkami na drobnych szczegółach.diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsvindex 338c4fadb..a27c3c1e2 100644--- a/crates/ui-egui/src/i18n/pt-br.tsv+++ b/crates/ui-egui/src/i18n/pt-br.tsv@@ -4020,3 +4020,10 @@ layerLabel No Color Sem corIncrease Brush Size Aumentar tamanho do pincelDecrease Brush Hardness Diminuir dureza do pincelIncrease Brush Hardness Aumentar dureza do pincel+ Demosaic Demosaico+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Como o mosaico do filtro de cor da câmera é preenchido. É aplicado ao abrir o arquivo; a visualização mostra o método com que ele foi aberto.+ AHD (adaptive homogeneity) AHD (homogeneidade adaptativa)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: as bordas mais limpas e o menor franjamento de cor; o mais lento.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Interpolação com correção de gradiente: nítida e rápida, com algum franjamento de cor em detalhes finos.+ The fastest and the softest, with colour fringing on fine detail. O mais rápido e o mais suave, com franjamento de cor em detalhes finos.diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsvindex 11fd43811..ac4906050 100644--- a/crates/ui-egui/src/i18n/ru.tsv+++ b/crates/ui-egui/src/i18n/ru.tsv@@ -3203,3 +3203,10 @@ curves Smooth СгладитьIncrease Brush Size Увеличить размер кистиDecrease Brush Hardness Уменьшить жёсткость кистиIncrease Brush Hardness Увеличить жёсткость кисти+ Demosaic Демозаик+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Как восстанавливается мозаика цветного фильтра камеры. Применяется при открытии файла; превью показывает метод, с которым файл был открыт.+ AHD (adaptive homogeneity) AHD (адаптивная однородность)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Хиракава–Паркс: самые чистые края и меньше всего цветной каймы, самый медленный.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Интерполяция с коррекцией градиента: резкая и быстрая, с небольшой цветной каймой на мелких деталях.+ The fastest and the softest, with colour fringing on fine detail. Самый быстрый и самый мягкий, с цветной каймой на мелких деталях.diff --git a/crates/ui-egui/src/i18n/sr.tsv b/crates/ui-egui/src/i18n/sr.tsvindex 25175aeff..d3435d231 100644--- a/crates/ui-egui/src/i18n/sr.tsv+++ b/crates/ui-egui/src/i18n/sr.tsv@@ -4303,3 +4303,10 @@ shape Appearance IzgledIncrease Brush Size Povećaj veličinu četkiceDecrease Brush Hardness Smanji tvrdoću četkiceIncrease Brush Hardness Povećaj tvrdoću četkice+ Demosaic Demozaikovanje+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Kako se popunjava mozaik filtera boja kamere. Primenjuje se pri otvaranju datoteke; pregled prikazuje metod kojim je datoteka otvorena.+ AHD (adaptive homogeneity) AHD (adaptivna homogenost)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: najčistije ivice i najmanje obojenih rubova, najsporiji.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Interpolacija sa korekcijom gradijenta: oštra i brza, sa malo obojenih rubova na finim detaljima.+ The fastest and the softest, with colour fringing on fine detail. Najbrži i najmekši, sa obojenim rubovima na finim detaljima.diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsvindex 6af551012..0d3833d85 100644--- a/crates/ui-egui/src/i18n/tr.tsv+++ b/crates/ui-egui/src/i18n/tr.tsv@@ -3960,3 +3960,10 @@ cameraData Lens LensIncrease Brush Size Fırça boyutunu büyütDecrease Brush Hardness Fırça sertliğini azaltIncrease Brush Hardness Fırça sertliğini artır+ Demosaic Demozaikleme+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Kameranın renk filtresi mozaiğinin nasıl doldurulduğu. Dosya açılırken uygulanır; önizleme dosyanın açıldığı yöntemi gösterir.+ AHD (adaptive homogeneity) AHD (uyarlamalı homojenlik)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: en temiz kenarlar ve en az renk saçağı, en yavaş.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Gradyan düzeltmeli ara değerleme: keskin ve hızlı, ince ayrıntılarda biraz renk saçağı.+ The fastest and the softest, with colour fringing on fine detail. En hızlı ve en yumuşak, ince ayrıntılarda renk saçağı.diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsvindex 37851e90f..5c44e3b0b 100644--- a/crates/ui-egui/src/i18n/uk.tsv+++ b/crates/ui-egui/src/i18n/uk.tsv@@ -3938,3 +3938,10 @@ curves Smooth ЗгладитиThis shape layer must be rasterized before proceeding. It will no longer be editable as a shape. Rasterize the shape? Щоб продовжити, потрібно растеризувати цей шар фігури. Після цього його більше не можна буде редагувати як фігуру. Растеризувати фігуру?This Smart Object must be rasterized before proceeding. Its contents will no longer be editable. Rasterize the Smart Object? Щоб продовжити, потрібно растеризувати цей смартоб’єкт. Після цього його вміст більше не можна буде редагувати. Растеризувати смартоб’єкт?This fill layer must be rasterized before proceeding. Its fill content will no longer be editable. Rasterize the layer? Щоб продовжити, потрібно растеризувати цей шар заливки. Після цього його заливку більше не можна буде редагувати. Растеризувати шар?+ Demosaic Демозаїк+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Як відновлюється мозаїка кольорового фільтра камери. Застосовується під час відкриття файлу; попередній перегляд показує метод, з яким файл було відкрито.+ AHD (adaptive homogeneity) AHD (адаптивна однорідність)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Хіракава–Паркс: найчистіші краї й найменше кольорової облямівки, найповільніший.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Інтерполяція з корекцією градієнта: різка й швидка, з невеликою кольоровою облямівкою на дрібних деталях.+ The fastest and the softest, with colour fringing on fine detail. Найшвидший і найм'якший, з кольоровою облямівкою на дрібних деталях.diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsvindex fd7950b93..571dd1e65 100644--- a/crates/ui-egui/src/i18n/vi.tsv+++ b/crates/ui-egui/src/i18n/vi.tsv@@ -3717,3 +3717,10 @@ curves Smooth Làm mượtIncrease Brush Size Tăng kích thước cọDecrease Brush Hardness Giảm độ cứng của cọIncrease Brush Hardness Tăng độ cứng của cọ+ Demosaic Giải khảm+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. Cách lấp đầy khảm lọc màu của máy ảnh. Áp dụng khi mở tệp; bản xem trước hiển thị phương pháp đã dùng khi mở.+ AHD (adaptive homogeneity) AHD (đồng nhất thích ứng)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks: cạnh sạch nhất và ít viền màu nhất, chậm nhất.+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. Nội suy hiệu chỉnh gradient: sắc nét và nhanh, có chút viền màu ở chi tiết nhỏ.+ The fastest and the softest, with colour fringing on fine detail. Nhanh nhất và mềm nhất, có viền màu ở chi tiết nhỏ.diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsvindex 01e0d5705..7167cc344 100644--- a/crates/ui-egui/src/i18n/zh-hans.tsv+++ b/crates/ui-egui/src/i18n/zh-hans.tsv@@ -2851,3 +2851,10 @@ curves Smooth 平滑Increase Brush Size 增大画笔大小Decrease Brush Hardness 减小画笔硬度Increase Brush Hardness 增大画笔硬度+ Demosaic 去马赛克+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. 如何填补相机彩色滤镜阵列的马赛克。在打开文件时应用;预览显示打开时所用的方法。+ AHD (adaptive homogeneity) AHD(自适应同质性)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks:边缘最干净、色边最少,速度最慢。+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. 梯度校正插值:锐利且快速,细节处有些许色边。+ The fastest and the softest, with colour fringing on fine detail. 最快也最柔和,细节处有色边。diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsvindex 2d9ad2905..8b5ec2f62 100644--- a/crates/ui-egui/src/i18n/zh-hant.tsv+++ b/crates/ui-egui/src/i18n/zh-hant.tsv@@ -2836,3 +2836,10 @@ curves Smooth 平滑Increase Brush Size 放大筆刷大小Decrease Brush Hardness 降低筆刷硬度Increase Brush Hardness 提高筆刷硬度+ Demosaic 去馬賽克+ How the camera's colour filter mosaic is filled in. It is applied when the file opens; the preview shows the method it was opened with. 如何填補相機彩色濾鏡陣列的馬賽克。在開啟檔案時套用;預覽顯示開啟時所用的方法。+ AHD (adaptive homogeneity) AHD(自適應同質性)+ Malvar–He–Cutler Malvar–He–Cutler+ Hirakawa–Parks: the cleanest edges and the least colour fringing, the slowest. Hirakawa–Parks:邊緣最乾淨、色邊最少,速度最慢。+ Gradient-corrected interpolation: sharp and fast, with some colour fringing on fine detail. 梯度校正插值:銳利且快速,細節處有些許色邊。+ The fastest and the softest, with colour fringing on fine detail. 最快也最柔和,細節處有色邊。diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rsindex e6685b9b7..5df29f60c 100644--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@ -253,7 +253,7 @@ pub use file_open::OsEvent;pub use state::{Tool, UiState};/// Decode a file: (document, warnings about anything approximated or dropped).-pub type ImportFn = Box<dyn Fn(&str, &[u8], usize) -> Result<(Document, Vec<String>), String>>;+pub type ImportFn = Box<dyn Fn(&str, &[u8], &photocraft_io::ImportOptions) -> Result<(Document, Vec<String>), String>>;/// Encoder settings chosen in Export As (the file format comes from the name's extension).#[derive(Clone, Debug, PartialEq)]pub struct ExportSettings {@@ -1349,8 +1349,8 @@ impl PhotocraftApp {return Ok(Vec::new());}let import = self.services.import.as_ref().ok_or("no importer configured")?;- let max_svg_group_depth = self.session.prefs().file_handling.rasterize_svg_groups_deeper_than as usize;- let (doc, warnings) = import(name, bytes, max_svg_group_depth)?;+ let opts = photocraft_engine::jobs::import_options(self.session.prefs());+ let (doc, warnings) = import(name, bytes, &opts)?;// Edit › Color Settings policies apply on open; Ask When Opening holds the file back// until its prompt is answered, and later files wait behind it (`open_prompt`).// Missing fonts are read from the document itself: it may not be open yet (#4559).@@ -1399,8 +1399,8 @@ impl PhotocraftApp {/// events and no Color Settings policy (which may read user-configured profile paths).fn import_automation_document(&mut self, name: &str, bytes: &[u8]) -> Result<Vec<String>, String> {let import = self.services.import.as_ref().ok_or("no importer configured")?;- let max_svg_group_depth = self.session.prefs().file_handling.rasterize_svg_groups_deeper_than as usize;- let (doc, warnings) = import(name, bytes, max_svg_group_depth)?;+ let opts = photocraft_engine::jobs::import_options(self.session.prefs());+ let (doc, warnings) = import(name, bytes, &opts)?;// The caller records the path it read from.self.session.add_document(doc, None);if let Some(st) = self.session.active_mut() {diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rsindex bbaf6fa6a..d4820fa25 100644--- a/crates/ui-egui/src/menus.rs+++ b/crates/ui-egui/src/menus.rs@@ -2095,7 +2095,7 @@ mod open_recent_tests {use photocraft_color::{ColorMode, SampleType};use photocraft_geom::Size;let services = crate::Services {- import: Some(Box::new(|_n: &str, _b: &[u8], _depth: usize| {+ import: Some(Box::new(|_n: &str, _b: &[u8], _opts: &photocraft_io::ImportOptions| {Ok((photocraft_doc::Document::new("t", Size::new(4, 4), ColorMode::Rgb, SampleType::U8), Vec::new()))})),..Default::default()diff --git a/crates/ui-egui/src/prefs_ui.rs b/crates/ui-egui/src/prefs_ui.rsindex 6c910865b..8f799c53f 100644--- a/crates/ui-egui/src/prefs_ui.rs+++ b/crates/ui-egui/src/prefs_ui.rs@@ -1143,6 +1143,8 @@ fn choice_label(v: &str) -> String {"dx12" => "DirectX 12".into(),"metal" => "Metal".into(),"gl" => "OpenGL".into(),+ "ahd" => "AHD (adaptive homogeneity)".into(),+ "mhc" => "Malvar–He–Cutler".into(),"cpu" => "CPU (no GPU acceleration)".into(),v => humanize(v),}@@ -3481,9 +3483,10 @@ mod tests {assert!(has_visible_fields(&values, "enhancedControls"));assert!(!prefs::is_hidden("enhancedControls.rotateViewWithTrackpad"));assert!(!prefs::is_hidden("enhancedControls.zoomWithTrackpadPinch"));- // Camera Raw Defaults shows only "Open in Camera Raw" so far.+ // Camera Raw Defaults shows "Open in Camera Raw" and the demosaic method so far.assert!(has_visible_fields(&values, "rawDefaults"));assert!(!prefs::is_hidden("rawDefaults.openInCameraRaw"));+ assert!(!prefs::is_hidden("rawDefaults.demosaic"));assert!(prefs::is_hidden("rawDefaults.applyAutoTone"));assert!(!prefs::is_hidden("general.autoShowHomeScreen"));assert!(!prefs::is_hidden("interface.uiScale"));diff --git a/crates/ui-egui/src/profile_open_tests.rs b/crates/ui-egui/src/profile_open_tests.rsindex 3eeb06b00..6adab105f 100644--- a/crates/ui-egui/src/profile_open_tests.rs+++ b/crates/ui-egui/src/profile_open_tests.rs@@ -30,8 +30,8 @@ fn harness(background: bool) -> Harness<'static, PhotocraftApp> {PhotocraftApp::new(Session::new(),Services {- import: Some(Box::new(|name, bytes, depth| {- photocraft_io::import_with_svg_group_depth(name, bytes, depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ import: Some(Box::new(|name, bytes, opts| {+ photocraft_io::import_with_options(name, bytes, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})),..Default::default()},@@ -168,8 +168,8 @@ fn the_prompt_is_translated_and_still_names_its_file() {),] {let services = Services {- import: Some(Box::new(|name, bytes, depth| {- photocraft_io::import_with_svg_group_depth(name, bytes, depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ import: Some(Box::new(|name, bytes, opts| {+ photocraft_io::import_with_options(name, bytes, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})),..Default::default()};@@ -204,7 +204,7 @@ fn a_held_file_still_reports_its_missing_fonts() {s.execute("type.create", serde_json::json!({"text": "Hi", "x": 2, "y": 12, "size": 10, "font": MISSING})).unwrap();let mut doc = (*s.active().unwrap().doc).clone();doc.icc_profile = Some(photocraft_cms::Builtin::from_id("adobe-rgb-compat").unwrap().profile().to_bytes());- let services = Services { import: Some(Box::new(move |_: &str, _: &[u8], _: usize| Ok((doc.clone(), Vec::new())))), ..Default::default() };+ let services = Services { import: Some(Box::new(move |_: &str, _: &[u8], _: &photocraft_io::ImportOptions| Ok((doc.clone(), Vec::new())))), ..Default::default() };let mut app = PhotocraftApp::new(Session::new(), services);app.run("edit.colorSettings", serde_json::json!({"askOnMismatch": true, "policyRgb": "preserve"})).unwrap();assert_eq!(app.open_bytes("poster.psd", b"x").unwrap(), vec![warning.clone()]);diff --git a/crates/ui-egui/src/profile_prompt_tests.rs b/crates/ui-egui/src/profile_prompt_tests.rsindex e055cdd54..1aa56eaac 100644--- a/crates/ui-egui/src/profile_prompt_tests.rs+++ b/crates/ui-egui/src/profile_prompt_tests.rs@@ -16,8 +16,8 @@ fn harness(background: bool) -> Harness<'static, PhotocraftApp> {PhotocraftApp::new(Session::new(),Services {- import: Some(Box::new(|name, bytes, depth| {- photocraft_io::import_with_svg_group_depth(name, bytes, depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ import: Some(Box::new(|name, bytes, opts| {+ photocraft_io::import_with_options(name, bytes, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})),..Default::default()},diff --git a/crates/ui-egui/src/save_identity_tests.rs b/crates/ui-egui/src/save_identity_tests.rsindex c947afc9b..988d529d8 100644--- a/crates/ui-egui/src/save_identity_tests.rs+++ b/crates/ui-egui/src/save_identity_tests.rs@@ -9,8 +9,8 @@ fn app() -> PhotocraftApp {let mut app = PhotocraftApp::new(Session::new(),Services {- import: Some(Box::new(|name, bytes, max_svg_group_depth| {- photocraft_io::import_with_svg_group_depth(name, bytes, max_svg_group_depth).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())+ import: Some(Box::new(|name, bytes, opts| {+ photocraft_io::import_with_options(name, bytes, opts).map(|r| (r.document, r.warnings)).map_err(|e| e.to_string())})),export: Some(Box::new(|doc, path, _| {photocraft_io::export(doc, path, &Default::default()).map(|r| (r.bytes, r.warnings)).map_err(|e| e.to_string())diff --git a/docs/scorecard.md b/docs/scorecard.mdindex 3b36e7c61..04b04a04f 100644--- a/docs/scorecard.md+++ b/docs/scorecard.md@@ -9,7 +9,7 @@ Generated by `cargo xtask scorecard` from `perf/budgets.toml`, `perf/baseline.js| [Performance](#performance) | 3 | 22 | 24 | 58 scenarios: 3 within budget, 22 over budget or failing, 9 tracked only, 19 not run, 5 not measurable yet (baseline 2026-10-05) || [File compatibility](#file-compatibility) | 7 | 14 | 6 | io corpus: oracle ≥ 148/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 249/309, round trip ≥ 308/309; photoshop oracles: oracle ≥ 188/256, round trip ≥ 258/256 || [Tools](#tools) | 33 | 11 | 0 | |-| [Workspace and UI](#workspace-and-ui) | 13 | 6 | 4 | settings that do nothing: 26 of 168 (target 0) |+| [Workspace and UI](#workspace-and-ui) | 13 | 6 | 4 | settings that do nothing: 26 of 169 (target 0) || [Type](#type) | 4 | 3 | 2 | || [Automation](#automation) | 5 | 2 | 4 | 631 of 631 menu items live (100.0%) || [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 30 of 30 crates; panic_hunt present |@@ -179,7 +179,7 @@ Corpus floors (`crates/io/tests/corpus.rs`): the enforced minimums; the corpus t## Workspace and UI-**Settings that do nothing: 26 of 168** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.+**Settings that do nothing: 26 of 169** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.Unread: `general.color_picker`, `general.animated_zoom`, `general.zoom_resizes_windows`, `workspace.auto_show_hidden_panels`, `workspace.enable_floating_document_window_docking`, `file_handling.save_in_background`, `performance.cache_levels`, `performance.legacy_compositing`, `scratch_disks.disks`, `units_and_rulers.column_width`, `units_and_rulers.gutter`, `plug_ins.show_extension_panels`, `plug_ins.allow_scripts_to_connect`, `plug_ins.generator_enabled`, `type_.text_engine`, `type_.recent_fonts`, `enhanced_controls.scrubby_slider_acceleration`, `enhanced_controls.touch_gestures`, `raw_defaults.color_space`, `raw_defaults.bit_depth`, `raw_defaults.resolution`, `raw_defaults.sharpen_for`, `raw_defaults.open_as_smart_object`, `raw_defaults.apply_auto_tone`, `integrations.allow_agent_control`, `integrations.control_port`.