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

From: David Ponce <[email-masked]>
Date: Sat, 15 Aug 2020 09:04:50 +0200

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!