aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Third2021-04-16 19:12:23 +0100
committerAlan Third2021-04-17 09:41:37 +0100
commitc7555f037ae7194fc331fb65c34c280680028b80 (patch)
tree5fea85f7b04e6750764be6ca77bbd7b22bd097b6 /src
parentcbf5bdd2538b92139603e7ab7ff17e4957bad7c6 (diff)
downloademacs-c7555f037ae7194fc331fb65c34c280680028b80.tar.gz
emacs-c7555f037ae7194fc331fb65c34c280680028b80.zip
Fix :scale's affect on :width and :height (bug#47819)
* src/image.c (compute_image_size): Multiply width and height values by scale.
Diffstat (limited to 'src')
-rw-r--r--src/image.c4
1 files changed, 2 insertions, 2 deletions
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,
2040 int_value = image_get_dimension (img, QCwidth); 2040 int_value = image_get_dimension (img, QCwidth);
2041 if (int_value >= 0) 2041 if (int_value >= 0)
2042 { 2042 {
2043 desired_width = int_value; 2043 desired_width = int_value * scale;
2044 /* :width overrides :max-width. */ 2044 /* :width overrides :max-width. */
2045 max_width = -1; 2045 max_width = -1;
2046 } 2046 }
@@ -2048,7 +2048,7 @@ compute_image_size (size_t width, size_t height,
2048 int_value = image_get_dimension (img, QCheight); 2048 int_value = image_get_dimension (img, QCheight);
2049 if (int_value >= 0) 2049 if (int_value >= 0)
2050 { 2050 {
2051 desired_height = int_value; 2051 desired_height = int_value * scale;
2052 /* :height overrides :max-height. */ 2052 /* :height overrides :max-height. */
2053 max_height = -1; 2053 max_height = -1;
2054 } 2054 }