From: Paul Eggert Date: Sun, 19 Jan 2025 07:26:02 +0000 (-0800) Subject: Always define image_compute_scale X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a35e31ca350272d8ac7645e66f86e05575dc7c5e;p=emacs.git Always define image_compute_scale * src/image.c (image_compute_scale): Define even if ! (defined HAVE_IMAGEMAGICK || defined HAVE_NATIVE_TRANSFORMS), because it is always used. Needed in platforms that lack all those image libraries. (cherry picked from commit fb434b85167d28e6739c8fc6fa80970011b79a0d) --- diff --git a/src/image.c b/src/image.c index 640e2a99904..bae7c13ac82 100644 --- a/src/image.c +++ b/src/image.c @@ -2672,6 +2672,7 @@ image_get_dimension (struct image *img, Lisp_Object symbol) } return -1; } +#endif /* Calculate the scale of the image. IMG may be null as it is only required when creating an image, and this function is called from @@ -2727,6 +2728,7 @@ image_compute_scale (struct frame *f, Lisp_Object spec, struct image *img) return scale; } +#if defined HAVE_IMAGEMAGICK || defined HAVE_NATIVE_TRANSFORMS /* Compute the desired size of an image with native size WIDTH x HEIGHT, which is to be displayed on F. Use IMG to deduce the size. Store the desired size into *D_WIDTH x *D_HEIGHT. Store -1 x -1 if the