]> git.eshelyaron.com Git - emacs.git/commitdiff
Always define image_compute_scale
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Jan 2025 07:26:02 +0000 (23:26 -0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 20 Jan 2025 15:58:16 +0000 (16:58 +0100)
* 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)

src/image.c

index 640e2a99904b65b56466716402c8465ed9f486a2..bae7c13ac8299440cf5219ccd25ac4fa589590cd 100644 (file)
@@ -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