GNU bug report logs - #32672
27.0.50; image resize on window resizing

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 9 Sep 2018 16:11:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 27.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 32672 <at> debbugs.gnu.org
Subject: bug#32672: 27.0.50; image resize on window resizing
Date: Thu, 27 Dec 2018 22:58:04 +0200
>> +(defun image-window-change (window)
>> +  (when (and (eq window (selected-window)) (derived-mode-p 'image-mode))
>> +    (let ((spec (image-get-display-property)))
>> +      (when (eq (car-safe spec) 'image)
>> +        (let* ((image-width  (plist-get (cdr spec) :max-width))
>> +               (image-height (plist-get (cdr spec) :max-height))
>> +               (window-edges (window-inside-pixel-edges window))
>> +               (window-width  (- (nth 2 window-edges) (nth 0 window-edges)))
>> +               (window-height (- (nth 3 window-edges) (nth 1 window-edges))))
>> +          (when (or (not (= image-width  window-width))
>> +                    (not (= image-height window-height)))
>> +            (image-toggle-display-image)))))))
>
> What happens in Emacs that was not built with Imagemagick?  Should we
> perhaps do nothing in this hook in that case?

Let's hope that native image scaling will handle this properly.




This bug report was last modified 5 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.