Skip to content

EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust

Merge pull request #2476 from ashokram-si/feat/targa-sequence-output

BFlatb669e4a9511e
diff --cc crates/engine/src/cmd/render_queue.rs
index 1cda510e0,8365349b5..079c9bd30
--- a/crates/engine/src/cmd/render_queue.rs
+++ b/crates/engine/src/cmd/render_queue.rs
@@@ -203,10 -203,25 +203,10 @@@ fn apply_om_template(om: &mut OutputMod
}
/// The `format` parameter's values.
- const FORMATS: &str = "format: h264|hevc|av1|prores|uncompressed|webm|png|jpeg|tiff|exr|gif|wav|aiff";
+ const FORMATS: &str = "format: h264|hevc|av1|prores|uncompressed|webm|png|jpeg|tiff|exr|tga|gif|wav|aiff";
-/// Apply Output Module parameters (`template` first). `roi`: the viewer's region of interest
-/// (captured by `crop.useRoi`).
-fn apply_output(om: &mut OutputModule, templates: &RenderTemplates, roi: Option<[f64; 4]>, p: &Value, cmd: &str) -> Result<bool> {
- let mut any = false;
- if let Some(t) = str_p(p, "template") {
- let t = templates.output_module(t).ok_or_else(|| bad(cmd, format!("no Output Module template “{t}”")))?;
- apply_om_template(om, &t);
- any = true;
- }
- let before = om.clone();
- if let Some(f) = str_p(p, "format") {
- let f = OutputFormat::from_name(f).ok_or_else(|| bad(cmd, FORMATS))?;
- om.set_format(f);
- }
- // Before Channels: the WebM codec decides whether alpha can be written, so an explicit
- // `channels: rgba` with `webmCodec: av1` is refused rather than dropped (#166).
- any |= apply_codec_options(om, p, cmd)?;
+/// `channels` (refusing RGBA where the format has no alpha) and `color`/`alphaMode`.
+fn apply_channels_and_alpha(om: &mut OutputModule, p: &Value, cmd: &str) -> Result<()> {
if let Some(c) = str_p(p, "channels") {
om.channels = match c.to_ascii_lowercase().replace([' ', '+'], "").as_str() {
"rgb" => Channels::Rgb,