From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24393: 25.1.50; image-mode ignore the image :scale Date: Fri, 09 Sep 2016 16:15:58 +0300 Message-ID: <837fal8b8x.fsf@gnu.org> References: <83pooe8g90.fsf@gnu.org> <83a8fh8pl0.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1473427126 9805 195.159.176.226 (9 Sep 2016 13:18:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 9 Sep 2016 13:18:46 +0000 (UTC) Cc: 24393@debbugs.gnu.org To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 09 15:18:42 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biLhW-0001gy-5K for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Sep 2016 15:18:38 +0200 Original-Received: from localhost ([::1]:57956 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biLhS-0005bv-0w for geb-bug-gnu-emacs@m.gmane.org; Fri, 09 Sep 2016 09:18:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biLg2-0004aZ-Ul for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 09:17:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biLfy-0001Yq-MP for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 09:17:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biLfy-0001Yl-K3 for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 09:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1biLfy-0001UD-FY for bug-gnu-emacs@gnu.org; Fri, 09 Sep 2016 09:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 09 Sep 2016 13:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24393 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24393-submit@debbugs.gnu.org id=B24393.14734269945675 (code B ref 24393); Fri, 09 Sep 2016 13:17:02 +0000 Original-Received: (at 24393) by debbugs.gnu.org; 9 Sep 2016 13:16:34 +0000 Original-Received: from localhost ([127.0.0.1]:54253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biLfV-0001TT-WA for submit@debbugs.gnu.org; Fri, 09 Sep 2016 09:16:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1biLfU-0001TF-CR for 24393@debbugs.gnu.org; Fri, 09 Sep 2016 09:16:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biLfL-0001Gq-Rn for 24393@debbugs.gnu.org; Fri, 09 Sep 2016 09:16:26 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biLfL-0001GC-Nv; Fri, 09 Sep 2016 09:16:23 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2128 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1biLfH-0005Hn-U8; Fri, 09 Sep 2016 09:16:22 -0400 In-reply-to: (message from Tino Calancha on Fri, 9 Sep 2016 19:23:02 +0900 (JST)) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123108 Archived-At: > From: Tino Calancha > Date: Fri, 9 Sep 2016 19:23:02 +0900 (JST) > cc: Tino Calancha , 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?