mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-21 01:18:43 +00:00
fix(batch): retain RAW resolution through tuned development
This commit is contained in:
1 parent
476948fd30
commit
c10cd89dec
2 files changed
+4
-2
No files matched your search
@@ -89,7 +89,9 @@ pub(super) fn prepare(s: &Session, name: &str, path: Option<&str>, bytes: &[u8])
|
||||
dehaze: settings.dehaze,
|
||||
};
|
||||
if tuning != (RawTuning { demosaic: opts.demosaic, ..Default::default() }) {
|
||||
let (developed, wb) = photocraft_io::raw::import_raw_tuned(name, bytes, &tuning).map_err(|error| EngineError::Other(format!("{name}: {error}")))?;
|
||||
super::open::raw_defaults(s, &imported.warnings, &mut imported.document);
|
||||
let (mut developed, wb) = photocraft_io::raw::import_raw_tuned(name, bytes, &tuning).map_err(|error| EngineError::Other(format!("{name}: {error}")))?;
|
||||
developed.document.resolution_dpi = imported.document.resolution_dpi;
|
||||
imported = developed;
|
||||
settings.exposure = 0.0;
|
||||
settings.shadows = 0.0;
|
||||
|
||||
@@ -464,7 +464,7 @@ fn batch_quiet_profile_open_uses_caller_policy_and_retains_diagnostics() {
|
||||
let mut fixture = Session::new();
|
||||
fixture.execute("file.openAs", json!({"path":source})).unwrap();
|
||||
fixture.execute("edit.assignProfile", json!({"profile":"display-p3"})).unwrap();
|
||||
fixture.execute("file.saveAs", json!({"path":source})).unwrap();
|
||||
fixture.execute("file.saveACopy", json!({"path":source,"overwrite":true})).unwrap();
|
||||
let original = std::fs::read(&source).unwrap();
|
||||
let bad = join(&dir, "b.png");
|
||||
std::fs::write(&bad, b"not an image").unwrap();
|
||||
|
||||
Reference in new issue
Block a user