From beea19dc97213e69174426b18ea3e8cd4297789f Mon Sep 17 00:00:00 2001 From: Michael Grant Date: Sun, 9 Aug 2026 22:15:37 +0100 Subject: [PATCH] Update image size accessor call sites --- image-fallback.c | 4 ++-- image-sixel.c | 4 ++-- image.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/image-fallback.c b/image-fallback.c index 3a49ec988..0d6ebfab4 100644 --- a/image-fallback.c +++ b/image-fallback.c @@ -259,7 +259,7 @@ image_glyph_make_shades(struct image *im, u_int levels) result = (levels == 5 ? data->shade5 : data->shade8); if (result != NULL) return (result); - image_get_cell_size(im, &sx, &sy); + image_get_size_in_cells(im, &sx, &sy); cells = (size_t)sx * sy; values = xcalloc(cells, sizeof *values); result = xcalloc(cells, 1); @@ -426,7 +426,7 @@ image_get_fallback_cell(struct tty *tty, struct image *im, u_int x, u_int y, if (detail == IMAGE_GLYPH_SHADE5 || detail == IMAGE_GLYPH_SHADE8) { levels = image_glyph_make_shades(im, detail == IMAGE_GLYPH_SHADE5 ? 5 : 8); - image_get_cell_size(im, &sx, NULL); + image_get_size_in_cells(im, &sx, NULL); level = levels[(size_t)y * sx + x]; key = (detail == IMAGE_GLYPH_SHADE5 ? shades[level] : bold_shades[level]); diff --git a/image-sixel.c b/image-sixel.c index 83eb64e9e..966c8c26f 100644 --- a/image-sixel.c +++ b/image-sixel.c @@ -1070,7 +1070,7 @@ sixel_from_image(struct image *im, u_int ox, u_int oy, u_int cells_x, image_get_size(im, &source.width, &source.height); image_get_canvas_size(im, &source.canvas_width, &source.canvas_height); - image_get_cell_size(im, &source.sx, &source.sy); + image_get_size_in_cells(im, &source.sx, &source.sy); destination_width = (uint64_t)source.sx * xpixel; destination_height = (uint64_t)source.sy * ypixel; if (destination_width > UINT_MAX || destination_height > UINT_MAX) @@ -1311,7 +1311,7 @@ sixel_render_image(struct image *im, u_int xpixel, u_int ypixel) struct sixel_image *original; u_int sx, sy; - image_get_cell_size(im, &sx, &sy); + image_get_size_in_cells(im, &sx, &sy); /* Preserve SIXEL's original palette and indexed pixels when possible. */ original = image_get_sixel(im); if (original != NULL) diff --git a/image.c b/image.c index 84ab233fb..90ed3d56a 100644 --- a/image.c +++ b/image.c @@ -730,7 +730,7 @@ image_write(struct screen_write_ctx *ctx, struct image *im, u_int bg) u_int cx = s->cx, cy = s->cy; u_int x, y, sx, sy, lines; - image_get_cell_size(im, &sx, &sy); + image_get_size_in_cells(im, &sx, &sy); if (sx > screen_size_x(s) - cx) sx = screen_size_x(s) - cx; if (sy > screen_size_y(s) - 1)