Subject: Re: bug#38394: Fwd: Use different image filtering when zooming in vs zooming out

From: David Ponce <[email-masked]>
Date: Fri, 14 Aug 2020 23:14:22 +0200

On 14/08/2020 22:20, Alan Third wrote:
> On Fri, Aug 14, 2020 at 08:03:04AM +0200, David Ponce wrote:
>> Hello,
>>
>> With this patch applied
>> (https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=519a93e067f459ceddb57573261a52118086b73d),
>> I noticed that small icon images look bad with image defaut
>> attributes, but look as expected when I add the attribute :scale 1
>> (see the attached screenshots). The issue is that by default on an
>> HiDPI screen, images are scaled up (in my configuration the default
>> scale is 1.2).
>>
>> I don't know if there is a way to force the smoothing behavior, if
>> not, maybe an image attribute could be considered ?
> 	
> Is this on X?

Yes, here are the Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF
ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS XWIDGETS
LIBSYSTEMD JSON PDUMPER LCMS2

> 
> 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.