mirror of
https://github.com/tmux/tmux.git
synced 2025-09-07 01:56:58 +00:00
Crop and scale images as needed when drawing them.
This commit is contained in:
5
sixel.c
5
sixel.c
@ -428,7 +428,7 @@ sixel_print_repeat(char **buf, size_t *len, size_t *used, u_int count, char ch)
|
||||
}
|
||||
|
||||
char *
|
||||
sixel_print(struct sixel_image *si, struct sixel_image *map)
|
||||
sixel_print(struct sixel_image *si, struct sixel_image *map, size_t *size)
|
||||
{
|
||||
char *buf, tmp[64], *contains, data, last;
|
||||
size_t len, used = 0, tmplen;
|
||||
@ -509,7 +509,10 @@ sixel_print(struct sixel_image *si, struct sixel_image *map)
|
||||
used--;
|
||||
|
||||
sixel_print_add(&buf, &len, &used, "\033\\", 2);
|
||||
|
||||
buf[used] = '\0';
|
||||
if (size != NULL)
|
||||
*size = used;
|
||||
|
||||
free(contains);
|
||||
return (buf);
|
||||
|
Reference in New Issue
Block a user