mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-24 09:57:08 -06:00
Integration: cargo fmt
This commit is contained in:
@@ -86,13 +86,37 @@ const SUBCOMMANDS: &[Subcommand] = &[
|
||||
Subcommand { name: "info", values: &[], bare: &["--compact"], run: |a, out, _| info(a, out) },
|
||||
Subcommand {
|
||||
name: "run",
|
||||
values: &["--new", "--cmd", "--params", "--out", "--format", "--quality", "--tga-bits", "--dpx-bits", "--dds-compression", "--tiff-compression", "--jpeg-format"],
|
||||
values: &[
|
||||
"--new",
|
||||
"--cmd",
|
||||
"--params",
|
||||
"--out",
|
||||
"--format",
|
||||
"--quality",
|
||||
"--tga-bits",
|
||||
"--dpx-bits",
|
||||
"--dds-compression",
|
||||
"--tiff-compression",
|
||||
"--jpeg-format",
|
||||
],
|
||||
bare: &["--tiff-layers", "--dds-mipmaps"],
|
||||
run: run_cmds,
|
||||
},
|
||||
Subcommand {
|
||||
name: "batch",
|
||||
values: &["--actions", "--action", "--in", "--out", "--format", "--quality", "--tga-bits", "--dpx-bits", "--dds-compression", "--tiff-compression", "--jpeg-format"],
|
||||
values: &[
|
||||
"--actions",
|
||||
"--action",
|
||||
"--in",
|
||||
"--out",
|
||||
"--format",
|
||||
"--quality",
|
||||
"--tga-bits",
|
||||
"--dpx-bits",
|
||||
"--dds-compression",
|
||||
"--tiff-compression",
|
||||
"--jpeg-format",
|
||||
],
|
||||
bare: &["--in-place", "--tiff-layers", "--dds-mipmaps"],
|
||||
run: batch,
|
||||
},
|
||||
|
||||
@@ -45,7 +45,14 @@ fn identity_app() -> (PhotocraftApp, RawOpen, Control) {
|
||||
let bytes = Arc::new(synthetic_raw());
|
||||
let imported = photocraft_io::import("synthetic.dng", &bytes).unwrap();
|
||||
let (index, _) = session.open_document(imported.document, None);
|
||||
let raw = RawOpen { document: session.documents()[index].doc.id, name: "synthetic.dng".into(), path: None, bytes: Some(bytes), developed_with: Default::default(), demosaic: Default::default() };
|
||||
let raw = RawOpen {
|
||||
document: session.documents()[index].doc.id,
|
||||
name: "synthetic.dng".into(),
|
||||
path: None,
|
||||
bytes: Some(bytes),
|
||||
developed_with: Default::default(),
|
||||
demosaic: Default::default(),
|
||||
};
|
||||
let mut app = PhotocraftApp::new(session, crate::Services::default());
|
||||
app.sync_views();
|
||||
(app, raw, control)
|
||||
|
||||
Reference in New Issue
Block a user