pict-rs/src/exiftool.rs
2021-10-20 19:00:41 -05:00

10 lines
303 B
Rust

use crate::process::Process;
use actix_web::web::Bytes;
use tokio::io::AsyncRead;
pub(crate) fn clear_metadata_bytes_read(input: Bytes) -> std::io::Result<impl AsyncRead + Unpin> {
let process = Process::run("exiftool", &["-all=", "-", "-out", "-"])?;
Ok(process.bytes_read(input).unwrap())
}