mirror of
https://github.com/tmux/tmux.git
synced 2025-10-14 22:06:02 +00:00
Do not force SIXEL images to a multiple of 6 lines. From nincsnevem662 at gmail
dot com in GitHub issue 4622.
This commit is contained in:
@@ -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
|
* 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
|
* map it onto the same size in terminal cells.
|
||||||
* can only draw vertical sections of six pixels.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sixel_size_in_cells(si, &cx, &cy);
|
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;
|
psy = sy * si->ypixel;
|
||||||
|
|
||||||
tsx = sx * xpixel;
|
tsx = sx * xpixel;
|
||||||
tsy = ((sy * ypixel) / 6) * 6;
|
tsy = sy * ypixel;
|
||||||
|
|
||||||
new = xcalloc (1, sizeof *si);
|
new = xcalloc (1, sizeof *si);
|
||||||
new->xpixel = xpixel;
|
new->xpixel = xpixel;
|
||||||
|
Reference in New Issue
Block a user