From 1dadd6c9ae8b3db55fd81442a9625d88d36888b4 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 7 Sep 2025 14:55:18 +0100 Subject: [PATCH] Do not force SIXEL images to a multiple of 6 lines. From nincsnevem662 at gmail dot com in GitHub issue 4622. --- image-sixel.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/image-sixel.c b/image-sixel.c index 27366df1..fac7eab9 100644 --- a/image-sixel.c +++ b/image-sixel.c @@ -423,8 +423,7 @@ sixel_scale(struct sixel_image *si, u_int xpixel, u_int ypixel, u_int ox, /* * We want to get the section of the image at ox,oy in image cells and - * map it onto the same size in terminal cells, remembering that we - * can only draw vertical sections of six pixels. + * map it onto the same size in terminal cells. */ sixel_size_in_cells(si, &cx, &cy); @@ -448,7 +447,7 @@ sixel_scale(struct sixel_image *si, u_int xpixel, u_int ypixel, u_int ox, psy = sy * si->ypixel; tsx = sx * xpixel; - tsy = ((sy * ypixel) / 6) * 6; + tsy = sy * ypixel; new = xcalloc (1, sizeof *si); new->xpixel = xpixel;