diff options
| -rw-r--r-- | lisp/net/shr.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index d91b00ca77d..9d42fde0756 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el | |||
| @@ -1016,14 +1016,17 @@ WIDTH and HEIGHT are the sizes given in the HTML data, if any." | |||
| 1016 | (max-width (truncate (* shr-max-image-proportion | 1016 | (max-width (truncate (* shr-max-image-proportion |
| 1017 | (- (nth 2 edges) (nth 0 edges))))) | 1017 | (- (nth 2 edges) (nth 0 edges))))) |
| 1018 | (max-height (truncate (* shr-max-image-proportion | 1018 | (max-height (truncate (* shr-max-image-proportion |
| 1019 | (- (nth 3 edges) (nth 1 edges)))))) | 1019 | (- (nth 3 edges) (nth 1 edges))))) |
| 1020 | (scaling (image-compute-scaling-factor image-scaling-factor))) | ||
| 1020 | (when (or (and width | 1021 | (when (or (and width |
| 1021 | (> width max-width)) | 1022 | (> width max-width)) |
| 1022 | (and height | 1023 | (and height |
| 1023 | (> height max-height))) | 1024 | (> height max-height))) |
| 1024 | (setq width nil | 1025 | (setq width nil |
| 1025 | height nil)) | 1026 | height nil)) |
| 1026 | (if (and width height) | 1027 | (if (and width height |
| 1028 | (< (* width scaling) max-width) | ||
| 1029 | (< (* height scaling) max-height)) | ||
| 1027 | (create-image | 1030 | (create-image |
| 1028 | data 'imagemagick t | 1031 | data 'imagemagick t |
| 1029 | :ascent 100 | 1032 | :ascent 100 |