pict-rs/src/exiftool.rs

10 lines
302 B
Rust
Raw Normal View History

use crate::stream::Process;
use actix_web::web::Bytes;
2021-09-14 01:22:42 +00:00
use tokio::io::AsyncRead;
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", "-"])?;
Ok(process.bytes_read(input).unwrap())
}