Hi.
I'm trying imv (4.2.0) on debian stable (bullseye) and imv *appears*
to be performing some kind of anti-aliasing or "image smoothing". I
have come to this conclusion because I have a png with rendered text
and when I view that image in imv, the rendered text appears smoothed,
whereas when I view that same png in sxiv, the rendered text appears
either smooth or jagged depending on how I toggle sxiv's anti-aliasing
(using the "a" key). I have also had a quick dig through sxiv's source
and I've found where sxiv sets an anti-alias toggle on its underlying
rendering library:
https://github.com/muennich/sxiv/blob/master/image.c#L722
which is documented in:
https://docs.enlightenment.org/api/imlib2/html/imlib2_8c.html
I've searched through all the imv documentation that I can find, but I
can find nothing that refers to anti-aliasing - either imv is
anti-aliasing but it is not documented, or I am completely "barking up
the wrong tree". :)
Could you please help me to understand what is happening here? Is imv
anti-aliasing because its underlying rendering library is throwing it
in as a default setting? Thank you, JT.
Hi Jaime,
I think you may be seeing the effects of the upscaling_method option. It
affects images are scaled up by imv. 'linear' does smooth interpolation,
and is the default, 'nearest_neighbour' will pick the value of the
closest pixel which is what you'd want for pixel art.
Hopefully that helps.
Harry
On Sat, 15 Jan 2022 at 14:30, Harry Jeffery <me@harry.pm> wrote:
> Hi Jaime,
Hi Harry,
> I think you may be seeing the effects of the upscaling_method option. It> affects images are scaled up by imv. 'linear' does smooth interpolation,> and is the default, 'nearest_neighbour' will pick the value of the> closest pixel which is what you'd want for pixel art.
That's exactly what it is. I now understand that what I thought was
anti-aliasing is actually the "linear" texture magnification function
(i.e. GL_TEXTURE_MAG_FILTER defaults to GL_LINEAR). I have now added:
upscaling_method = nearest_neighbour
to my config [options] section (and I have also found the default
binding of the "S" key to "upscaling next"), and all is good. Thank
you for your reply. With best wishes, Jaime.