aboutsummaryrefslogtreecommitdiff
path: root/transcoder/src/image.rs
diff options
context:
space:
mode:
Diffstat (limited to 'transcoder/src/image.rs')
-rw-r--r--transcoder/src/image.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/transcoder/src/image.rs b/transcoder/src/image.rs
index a9b1533..06a2f80 100644
--- a/transcoder/src/image.rs
+++ b/transcoder/src/image.rs
@@ -17,6 +17,7 @@ pub async fn transcode(
let asset = asset.clone();
Ok(async_cache_file(
&[
+ "image-tc",
original_path.as_os_str().to_str().unwrap(),
&format!("{width} {quality} {speed}"),
],
@@ -47,12 +48,16 @@ pub async fn transcode(
pixels.as_rgba(),
image.width() as usize,
image.height() as usize,
- ))?;
+ ))
+ .context("avif encoding")?;
info!("transcode finished");
Ok::<_, anyhow::Error>(encoded)
})
.await??;
- output.write_all(&encoded.avif_file).await?;
+ output
+ .write_all(&encoded.avif_file)
+ .await
+ .context("writing encoded image")?;
Ok(())
},
)