For sixel, no need to round image size to multiple of character size.
With this fix combined with fix to libsixel: https://github.com/saitoha/libsixel/pull/170 browsing on slow machines (e.g., when floating-point calculation is emulated by kernel) gets significantly speed up. Note that if i->cache->a_width (i->cache->a_height) is zero, width (height) should be set to zero. Otherwise, image in screen boundary (i.e., partially displayed) becomes strangely resized.
This commit is contained in:
4
image.c
4
image.c
@@ -253,7 +253,9 @@ drawImage()
|
||||
|
||||
|
||||
if (enable_inline_image == INLINE_IMG_SIXEL) {
|
||||
put_image_sixel(url, x, y, w, h, sx, sy, sw, sh, n_terminal_image);
|
||||
w = i->cache->a_width > 0 ? i->width : 0;
|
||||
h = i->cache->a_height > 0 ? i->height : 0;
|
||||
put_image_sixel(url, x, y, w, h, i->sx, i->sy, sw * pixel_per_char, sh * pixel_per_line_i, n_terminal_image);
|
||||
} else if (enable_inline_image == INLINE_IMG_OSC5379) {
|
||||
put_image_osc5379(url, x, y, w, h, sx, sy, sw, sh);
|
||||
} else if (enable_inline_image == INLINE_IMG_ITERM2) {
|
||||
|
Reference in New Issue
Block a user