]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix max-width/height for Message screenshots
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 5 Aug 2020 13:02:28 +0000 (15:02 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 5 Aug 2020 13:02:28 +0000 (15:02 +0200)
* lisp/gnus/message.el (message-insert-screenshot):
:max-width/height apparently has to be integers.

lisp/gnus/message.el

index 378c3b046734fe730c04ad8959efb7b226e915b3..cf2b8eebc3031188c9ca5fc05112d6c859666276 100644 (file)
@@ -8693,8 +8693,8 @@ used to take the screenshot."
     (set-mark (point))
     (insert-image
      (create-image image 'png t
-                  :max-width (* (frame-pixel-width) 0.8)
-                  :max-height (* (frame-pixel-height) 0.8)
+                  :max-width (truncate (* (frame-pixel-width) 0.8))
+                  :max-height (truncate (* (frame-pixel-height) 0.8))
                   :scale 1)
      (format "<#part type=\"image/png\" disposition=inline content-transfer-encoding=base64 raw=t>\n%s\n<#/part>"
             ;; Get a base64 version of the image -- this avoids later