+2014-08-05 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * image-mode.el (image-toggle-display-image): Alway rescale images
+ to not be bigger than the current window.
+
2014-08-05 Eric Brown <brown@fastmail.fm> (tiny change)
* net/eww.el (eww-bookmarks-directory): New variable.
(string-make-unibyte
(buffer-substring-no-properties (point-min) (point-max)))
filename))
- (type (image-type file-or-data nil data-p))
- (image (create-image file-or-data type data-p))
+ (edges (window-inside-pixel-edges
+ (get-buffer-window (current-buffer))))
+ (type (if (fboundp 'imagemagick-types)
+ 'imagemagick
+ (image-type file-or-data nil data-p)))
+ (image (create-image file-or-data type data-p
+ :max-width (- (nth 2 edges) (nth 0 edges))
+ :max-height (- (nth 3 edges) (nth 1 edges))))
(inhibit-read-only t)
(buffer-undo-list t)
(modified (buffer-modified-p))