unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Ponce <da_vid@orange.fr>
To: Alan Third <alan@idiocy.org>, 38394@debbugs.gnu.org
Subject: bug#38394: Fwd: Use different image filtering when zooming in vs zooming out
Date: Sat, 15 Aug 2020 09:04:50 +0200	[thread overview]
Message-ID: <8b26159f-8576-8f68-85b0-99118c442635@orange.fr> (raw)
In-Reply-To: <20200814231014.GA44817@breton.holly.idiocy.org>

On 15/08/2020 01:10, Alan Third wrote:
> On Fri, Aug 14, 2020 at 11:14:22PM +0200, David Ponce wrote:
>> On 14/08/2020 22:20, Alan Third wrote:
>>> Maybe we should only go to nearest neighbour when the scaling is >= 2?
>>> Or greater than the scale factor? Hmm, I'm not sure what's best here.
>>>
>>
>> Not sure either.
>> Maybe an option could define the min scale to go to nearest neighbour?
>> By default (nil?) it could be the scale factor?
>>
>> An image attribute could make sense too, similar to :scale, but for smoothing.
> 
> Can you try replacing this line (2125):
> 
>      bool scale_down = (width < img->width) || (height < img->height);
> 
> with
> 
>      bool scale_down = (double)width/img->width < 1.2;
> 
> and have a play about with the number and see how it looks?
> 

I did try your change. With value 1.2 (the default scale factor on my configuration) images look smooth.
They don't, as soon as I change the image scaling to be greater than 1.2.

IMO, regardless of the scaling it is important to have a way to control how some kind of images will look, like UI elements which must always look smoothed.
So, an option to control this is important in such cases, regardless of the scaling factor.
It should be possible to use small icons scaled by 1.5 or 2 for example, for UI elements.
And such UI elements should still look good, even if the default scaling factor is less than 1.5.

Thanks!






  reply	other threads:[~2020-08-15  7:04 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 21:11 bug#38109: 27.0.50; xpm image scaling doesn't work Unknown
2019-11-07 21:30 ` bug#38109: Updated Emacs to HEAD, consistently not scaling now Unknown
2019-11-07 21:49   ` Lars Ingebrigtsen
2019-11-07 21:54     ` Unknown
2019-11-07 22:03       ` Lars Ingebrigtsen
2019-11-07 22:12         ` Unknown
2019-11-08 19:34           ` Alan Third
2019-11-08 19:38             ` Alan Third
2019-11-08 21:19               ` Unknown
2019-11-08 21:03             ` Unknown
2019-11-08 21:12               ` Lars Ingebrigtsen
2019-11-08 21:18                 ` Unknown
2019-11-08 21:19                   ` Lars Ingebrigtsen
2019-11-08 21:35                     ` Unknown
2019-11-08 23:03               ` Alan Third
2019-11-09 17:22                 ` Alan Third
2019-11-09 17:58                   ` Eli Zaretskii
2019-11-09 18:11                     ` Alan Third
2019-11-09 18:42                       ` Eli Zaretskii
2019-11-09 20:09                   ` Lars Ingebrigtsen
2019-11-09 21:56                   ` Unknown
2019-11-09 22:18                     ` Unknown
2019-11-09 23:13                       ` Unknown
2019-11-10 17:12                         ` Alan Third
2019-11-16 16:53                           ` Unknown
2019-11-17 17:22                             ` Alan Third
2019-11-17 18:23                               ` Unknown
2019-11-17 18:49                                 ` Unknown
2019-11-17 19:01                                   ` Alan Third
2019-11-09  6:33               ` Eli Zaretskii
2019-11-09 10:28                 ` Unknown
2019-11-09 10:37                   ` Eli Zaretskii
2019-11-08 21:11             ` Lars Ingebrigtsen
2019-11-08 23:06               ` Alan Third
2019-11-08  6:36     ` Eli Zaretskii
2019-11-08 21:04       ` Lars Ingebrigtsen
2019-11-09  6:31         ` Eli Zaretskii
2019-11-07 21:58 ` bug#38109: 27.0.50; xpm image scaling doesn't work Stephen Berman
2019-11-08  6:28 ` Eli Zaretskii
2019-11-08  8:17   ` Unknown
2019-11-08 21:46 ` bug#38109: Another data point Unknown
2019-11-08 22:02   ` Lars Ingebrigtsen
2019-11-23  0:02 ` bug#38109: Updated Emacs to HEAD, consistently not scaling now Unknown
2019-11-24 17:26   ` Alan Third
2019-11-24 17:52     ` Unknown
2019-11-26 20:36       ` Alan Third
2019-11-26 20:40         ` Unknown
     [not found]           ` <20191126212729.GC7891@breton.holly.idiocy.org>
2019-11-26 21:39             ` bug#38394: Fwd: Use different image filtering when zooming in vs zooming out Alan Third
2019-11-27 12:32               ` Lars Ingebrigtsen
2019-12-02 13:05                 ` Alan Third
2019-12-05 10:02                   ` Lars Ingebrigtsen
2020-08-02 17:52               ` Lars Ingebrigtsen
2020-08-02 20:35                 ` Alan Third
2020-08-03  6:10                   ` Lars Ingebrigtsen
2020-08-03  9:10                     ` Alan Third
2020-08-03 14:04                       ` Robert Pluim
2020-08-03 15:13                         ` Alan Third
2020-08-03 19:55                           ` Robert Pluim
2020-08-04  8:52                       ` Lars Ingebrigtsen
2020-08-04 19:51                         ` Alan Third
2020-08-05  8:47                           ` Lars Ingebrigtsen
2020-08-14  6:03               ` David Ponce
2020-08-14 20:20                 ` Alan Third
2020-08-14 21:14                   ` David Ponce
2020-08-14 23:10                     ` Alan Third
2020-08-15  7:04                       ` David Ponce [this message]
2019-11-29 21:27     ` bug#38109: Updated Emacs to HEAD, consistently not scaling now Alan Third

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8b26159f-8576-8f68-85b0-99118c442635@orange.fr \
    --to=da_vid@orange.fr \
    --cc=38394@debbugs.gnu.org \
    --cc=alan@idiocy.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).