]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix :scale's affect on :width and :height (bug#47819)
authorAlan Third <alan@idiocy.org>
Fri, 16 Apr 2021 18:12:23 +0000 (19:12 +0100)
committerAlan Third <alan@idiocy.org>
Sat, 17 Apr 2021 08:41:37 +0000 (09:41 +0100)
* src/image.c (compute_image_size): Multiply width and height values
by scale.

src/image.c

index 1619886f5a1210443b612b72339f34ed046f65fd..ff4ef018044f9179f58cb69b1a1f0ab304bac97f 100644 (file)
@@ -2040,7 +2040,7 @@ compute_image_size (size_t width, size_t height,
   int_value = image_get_dimension (img, QCwidth);
   if (int_value >= 0)
     {
-      desired_width = int_value;
+      desired_width = int_value * scale;
       /* :width overrides :max-width. */
       max_width = -1;
     }
@@ -2048,7 +2048,7 @@ compute_image_size (size_t width, size_t height,
   int_value = image_get_dimension (img, QCheight);
   if (int_value >= 0)
     {
-      desired_height = int_value;
+      desired_height = int_value * scale;
       /* :height overrides :max-height. */
       max_height = -1;
     }