swayimg icon indicating copy to clipboard operation
swayimg copied to clipboard

Antialiasing not working correctly

Open charbelnicolas opened this issue 6 months ago • 5 comments

Hi Artem, I've noticed that the current implementation of the antialiasing doesn't work correctly. I've made a comparison of a thumbnail antialiased by swayimg against imagemagick's cubic filter and there is a massive difference.

I have set my thumbnails to a 300 x 300 pixel size so I ran this command on the images with imagemagick:

magick image_file.jpg -resize 300x300^ -filter cubic -gravity center -extent 300x300 image_file.png

ss_2024_08_29_00_48_47

Please check the top row images and compare the left image (swayimg scaling) with the right image (imagemagick scaling). The jagermeister image is inverted, the right image is swayimg's scaling and the left one is imagemagick's scaling.

I think the scaling/antialiasing can be further improved, as it is right now, it is as if nothing is being done to antialias the images. I guess this applies to both viewer and gallery mode although it is more noticeable when viweing the small thumbnails.

charbelnicolas avatar Aug 29 '24 06:08 charbelnicolas