Skip to main content

Crate oxideav_cli_convert

Crate oxideav_cli_convert 

Source
Expand description

oxideav convert engine.

Translates ImageMagick-style arg syntax into an in-memory oxideav_pipeline::Job and runs it through the same executor the oxideav run subcommand uses. One code path serves image, video, and audio inputs — a PNG → JPG is just a 1-frame stream.

Entry point: run takes the slice of arguments that come after oxideav convert plus the caller-supplied registries, and does everything.

§Example

use oxideav_core::RuntimeContext;

let mut ctx = RuntimeContext::new();
oxideav_source::register(&mut ctx);

// Equivalent to:
//   oxideav convert in.png -resize 800x600 out.jpg
oxideav_cli_convert::run(
    &[
        "in.png".into(),
        "-resize".into(),
        "800x600".into(),
        "out.jpg".into(),
    ],
    &ctx,
).unwrap();

Re-exports§

pub use op::AlphaOp;
pub use op::ConvertPlan;
pub use op::Dither;
pub use op::Op;
pub use op::PrintfTemplate;
pub use op::ResizeMode;
pub use route::Route;

Modules§

args
IM-style arg parser.
op
IM-style operations supported by oxideav convert.
plan_to_job
Translate an crate::op::ConvertPlan into an oxideav_pipeline::Job.
route
Pure routing layer: decide which execution path a parsed ConvertPlan takes, without performing any conversion work.

Functions§

run
Run convert with a caller-supplied RuntimeContext.
run_with_preferences
run with every decoder / encoder of the pipeline route resolved under prefs — the CLI forwards --no-hwaccel here (CodecPreferences { no_hardware: true, .. }).