parent
3fcf0e3db7
commit
76cb5801f6
3 changed files with 28 additions and 43 deletions
12
st.c
12
st.c
|
|
@ -2650,16 +2650,16 @@ strhandle(void)
|
|||
term.mode &= ~MODE_SIXEL;
|
||||
new_image = malloc(sizeof(ImageList));
|
||||
memset(new_image, 0, sizeof(ImageList));
|
||||
if (sixel_parser_finalize(&sixel_st, &new_image->pixels) != 0) {
|
||||
perror("sixel_parser_finalize() failed");
|
||||
sixel_parser_deinit(&sixel_st);
|
||||
free(new_image);
|
||||
return;
|
||||
}
|
||||
new_image->x = term.c.x;
|
||||
new_image->y = term.c.y;
|
||||
new_image->width = sixel_st.image.width;
|
||||
new_image->height = sixel_st.image.height;
|
||||
new_image->pixels = malloc(new_image->width * new_image->height * 4);
|
||||
if (sixel_parser_finalize(&sixel_st, new_image->pixels) != 0) {
|
||||
perror("sixel_parser_finalize() failed");
|
||||
sixel_parser_deinit(&sixel_st);
|
||||
return;
|
||||
}
|
||||
sixel_parser_deinit(&sixel_st);
|
||||
if (term.images) {
|
||||
ImageList *im;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue