From: Alan Third Date: Fri, 16 Apr 2021 18:12:23 +0000 (+0100) Subject: Fix :scale's affect on :width and :height (bug#47819) X-Git-Tag: emacs-28.0.90~2832 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c7555f037ae7194fc331fb65c34c280680028b80;p=emacs.git Fix :scale's affect on :width and :height (bug#47819) * src/image.c (compute_image_size): Multiply width and height values by scale. --- diff --git a/src/image.c b/src/image.c index 1619886f5a1..ff4ef018044 100644 --- a/src/image.c +++ b/src/image.c @@ -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; }