diff --git a/src/converter.rs b/src/converter.rs index b302eb4..fc2cd14 100644 --- a/src/converter.rs +++ b/src/converter.rs @@ -66,7 +66,7 @@ pub async fn run_conversion_loop( // size for the area given, so to save ratatui the work of having to // resize it, we tell them to crop it to fit. let txt_img = picker - .new_protocol(dyn_img, img_area, Resize::Scale(None)) + .new_protocol(dyn_img, img_area, Resize::None) .map_err(|e| { RenderError::Converting(format!( "Couldn't convert DynamicImage to ratatui image: {e}" diff --git a/src/renderer.rs b/src/renderer.rs index e593b31..66e0205 100644 --- a/src/renderer.rs +++ b/src/renderer.rs @@ -271,7 +271,7 @@ pub fn start_rendering( * ctx.pixmap.height() * u32::from(ctx.pixmap.n())) as usize; let mut pixels = Vec::with_capacity(cap); - if let Err(e) = ctx.pixmap.write_to(&mut pixels, mupdf::ImageFormat::PAM) { + if let Err(e) = ctx.pixmap.write_to(&mut pixels, mupdf::ImageFormat::PNM) { sender.send(Err(RenderError::Doc(e)))?; continue; };