bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eli Zaretskii
Subject: bug#24393: 25.1.50; image-mode ignore the image :scale
Date: Fri, 09 Sep 2016 16:15:58 +0300

> From: Tino Calancha <tino.calancha@gmail.com>
> Date: Fri, 9 Sep 2016 19:23:02 +0900 (JST)
> cc: Tino Calancha <tino.calancha@gmail.com>, 24393@debbugs.gnu.org
> 
> >      ;; 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.

When image-transform-fit-to-width sets image-transform-resize to the
symbol 'fit-width', image-toggle-display-image will not pass any
dimensions to create-image.  So how will the image be resized at all
in this case?  What am I missing?

And how do you explain the assertion violation in this case, anyway?
What are the window dimensions in pixels?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]