2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-11-12 23:43:57 +00:00
pict-rs/src/exiftool.rs

11 lines
358 B
Rust
Raw Normal View History

2021-10-21 00:00:41 +00:00
use crate::process::Process;
use actix_web::web::Bytes;
2021-09-14 01:22:42 +00:00
use tokio::io::AsyncRead;
2022-04-07 02:40:49 +00:00
#[tracing::instrument(name = "Clearing metadata", skip(input))]
pub(crate) fn clear_metadata_bytes_read(input: Bytes) -> std::io::Result<impl AsyncRead + Unpin> {
2021-09-14 01:22:42 +00:00
let process = Process::run("exiftool", &["-all=", "-", "-out", "-"])?;
2022-04-07 02:40:49 +00:00
Ok(process.bytes_read(input))
}