~exec64/imv-devel

2 2

Trying to understand imv's anti-aliasing. Can I switch this off?

Details
Message ID
<CAAbCkm++y3h_srL-qmWzy7ukR4FGqnZwe3obdaPKF5N00GXXEg@mail.gmail.com>
DKIM signature
missing
Download raw message
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.
Details
Message ID
<c085c2d8-06d7-f469-f399-aaa326db152d@harry.pm>
In-Reply-To
<CAAbCkm++y3h_srL-qmWzy7ukR4FGqnZwe3obdaPKF5N00GXXEg@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
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
Details
Message ID
<CAAbCkmKmO+EH+ObY8YdnQkk1N=qnJxZkncOP1D9Zw4gxXzaC-g@mail.gmail.com>
In-Reply-To
<c085c2d8-06d7-f469-f399-aaa326db152d@harry.pm> (view parent)
DKIM signature
missing
Download raw message
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.
Reply to thread Export thread (mbox)