GNU bug report logs - #24393
25.1.50; image-mode ignore the image :scale

Previous Next

Package: emacs;

Reported by: Tino Calancha <tino.calancha <at> gmail.com>

Date: Thu, 8 Sep 2016 12:15:01 UTC

Severity: normal

Tags: moreinfo

Found in version 25.1.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 24393 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24393 <at> debbugs.gnu.org, Tino Calancha <tino.calancha <at> gmail.com>
Subject: Re: bug#24393: 25.1.50; image-mode ignore the image :scale
Date: Fri, 9 Sep 2016 19:23:02 +0900 (JST)

On Fri, 9 Sep 2016, Eli Zaretskii wrote:

> Isn't there something wrong with the logic from the following fragment
> of image-toggle-display-image?  The comment certainly seems to have it
> backwards, or at least in contradiction to what
> image-transform-fit-to-width expects.
>
> 	 ;; If we have a `fit-width' or a `fit-height', don't limit
> 	 ;; the size of the image to the window size.
> 	 (edges (and (null image-transform-resize)
> 		     (window-inside-pixel-edges
> 		      (get-buffer-window (current-buffer)))))
>
> I think 'edges' should be non-nil if image-transform-resize is
> non-nil, no?
I think is OK.  Maybe i would adjust the comment a bit, because 
`image-transform-resize' can also be a number (set by 
`image-transform-set-scale'): i would say:
;; If `image-transform-resize' is non-nil, don't limit
;; the size of the image to the window size.

I think the logic is as follows:
The proportion width/height is an invariant of this transformation.
If you call `image-transform-fit-to-width', your image width will occupy 
all the window width.  Then, the height is increased in the same 
proportion as the width, so the final image height may be longer than
the window height.  That's OK.





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

Previous Next


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