diff options
author | Canop <cano.petrole@gmail.com> | 2020-11-27 13:18:06 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-11-27 13:18:06 +0100 |
commit | 527df68c7844a720773d0560aa0ccdc333207c78 (patch) | |
tree | 1ed6f3ee6cec6eee841160f853fbea5dde851697 /src/image/image_view.rs | |
parent | d0780bc4560e050a04293b941f1e44cb067eefc0 (diff) |
kitty: avoid conversion to rgba, only transmit alpha when present
Diffstat (limited to 'src/image/image_view.rs')
-rw-r--r-- | src/image/image_view.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/image/image_view.rs b/src/image/image_view.rs index a9fa3ff..4156064 100644 --- a/src/image/image_view.rs +++ b/src/image/image_view.rs @@ -78,12 +78,10 @@ impl ImageView { #[cfg(unix)] if let Some(renderer) = kitty::image_renderer() { let mut renderer = renderer.lock().unwrap(); - w.queue(cursor::MoveTo(area.left, area.top))?; - renderer.print_with_temp_file( + renderer.print( w, &self.source_img, - area.width, - area.height, + area, )?; for y in area.top..area.top+area.height { w.queue(cursor::MoveTo(area.left, y))?; |