From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#51596: image-transform-resize has inconsistent semantics wrt scaling up/down Date: Thu, 4 Nov 2021 11:52:16 -0700 Message-ID: References: <87fssbu7wh.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25288"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 51596@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 04 19:53:22 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mihrV-0006Js-GG for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Nov 2021 19:53:21 +0100 Original-Received: from localhost ([::1]:56526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mihrT-0007zJ-J1 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 04 Nov 2021 14:53:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38044) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mihrC-0007wl-R6 for bug-gnu-emacs@gnu.org; Thu, 04 Nov 2021 14:53:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60251) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mihrC-0005OY-I8 for bug-gnu-emacs@gnu.org; Thu, 04 Nov 2021 14:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mihrC-00061D-Hb for bug-gnu-emacs@gnu.org; Thu, 04 Nov 2021 14:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Nov 2021 18:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51596 X-GNU-PR-Package: emacs Original-Received: via spool by 51596-submit@debbugs.gnu.org id=B51596.163605194423065 (code B ref 51596); Thu, 04 Nov 2021 18:53:02 +0000 Original-Received: (at 51596) by debbugs.gnu.org; 4 Nov 2021 18:52:24 +0000 Original-Received: from localhost ([127.0.0.1]:43560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mihqa-0005zw-27 for submit@debbugs.gnu.org; Thu, 04 Nov 2021 14:52:24 -0400 Original-Received: from mail-pl1-f172.google.com ([209.85.214.172]:37458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mihqY-0005zk-Jc for 51596@debbugs.gnu.org; Thu, 04 Nov 2021 14:52:23 -0400 Original-Received: by mail-pl1-f172.google.com with SMTP id n8so8791099plf.4 for <51596@debbugs.gnu.org>; Thu, 04 Nov 2021 11:52:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=Z5jPl4qwiIJXnEzk0B+Y9GBS/zWKw+0Mdr+/Cp9XZHc=; b=EONsWpGUHUTk4LeF2aXH+rkBvR8SjfSIfmHoiZbX0/ckyLIGpxkT91MlXLQvn8wBqR fFtNm68XGfrQ9AaZjtkKRKa/x8fGY9AlGuJ+mcpWk5mLg14GV3U8nVs5NqmsfERlFX79 wS8GTYWpoFe0hwl13189IKXCj6SSMuxY8cvi3kDTD50i/EjoYzrIjlvIUCXzNUcPmw68 weGMoJ8QKm2Jd1ucmDAPVJ0qLIuTnkR3M+I97dZoMVNBXtcEYPNOoGrAEiTf/0POkQ0c hwoOgH+zKvZHbeGocl/eEL5h9MjV88nBhAQzRBS8X86M1/UAsFcHBy5th/kve1ZkJkQ0 iC3Q== X-Gm-Message-State: AOAM531sNFNCmh6VJcSrPmmbLD3PEEYKJGuUhZKFerTBumFfQhsTofQc VWhOcYvlZfIkHzHhDF7kGEr/KMbj3Ge9J6X3uB8= X-Google-Smtp-Source: ABdhPJwHbksiRjVTkbvUqnZAP18YWWVAjQqQq3MqbSug2ipinDuTLsU+iNTkRKkacYxSuIeHIAw4VMkwh66N3Z7di6c= X-Received: by 2002:a17:902:8c93:b0:141:5442:e608 with SMTP id t19-20020a1709028c9300b001415442e608mr46365400plo.32.1636051936566; Thu, 04 Nov 2021 11:52:16 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 4 Nov 2021 11:52:16 -0700 In-Reply-To: <87fssbu7wh.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:218937 Archived-At: Lars Ingebrigtsen writes: > Stefan Kangas writes: > >> "Fit height" and "fit width" both scales an image up or down, but "fit >> height and width" only scales an image down. Is that intentional? > > Yes, I think so? The point of the latter is that too-big images are > pretty useless -- you want to scale them down so that you can actually > see them. But it doesn't therefore follow that you want to scale tiny > icons up to fill the screen. Right, and that's a valid use case of course. I still find the interface inconsistent, as the naming scheme suggests that these three options should behave similarly. I made a quick review of other image viewers: emacs gthumb geeqie eog ----- ------ ------ --- fit height and width Automatic Zoom 1:1 Best fit Fit to window Fit image to window fit to width Fit to width fit to height Fit to height How about renaming "fit height and width" to something that suggests that it behaves differently from "fit to width" and "fit to height", and then adding a new option "fit to window" that scales up or down as needed? Perhaps we could even have a "smart" option that only scales images up larger than some height and width, and otherwise leaves them in their original size. That's probably the one I would like to use, now that I think about it. (I usually prefer to scale images up, but as you point out it's pretty useless to scale small icons to fit the window.)