emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image transformation filter for upscaled images


From: Evgeny Zajcev
Subject: Re: Image transformation filter for upscaled images
Date: Mon, 8 Mar 2021 01:35:50 +0300

вс, 7 мар. 2021 г. в 23:46, Alan Third <alan@idiocy.org>:
On Sun, Mar 07, 2021 at 10:12:43PM +0300, Evgeny Zajcev wrote:
> Currently, image transformation for upscaled images uses NEAREST filter,
> which is fast, but renders very bad results for images with text inside.
>
> Maybe change it to GOOD, which is also fast, but renders more decent results
>
> Here is I've got two screenshots showing the difference:
>
> NEAREST (currently hardcoded in Emacs) -
> http://lgarc.narod.ru/pics/upscaled-nearest.png
>
> GOOD (my proposal) - http://lgarc.narod.ru/pics/upscaled-good.png
>
> What do you think?

See also bug#38394.

The reason nearest was chosen was because scaled up pixel art (emojis,
mostly, like etc/images/smilies/wry.xpm) looked abominable

In 2k21 any xpm with any filter will look abominable :)

when using
the "best" filter,
 
but most other types of images look OK when using
nearest.

We (telega.el project) see many images of different kind daily, and only some of them looks OK when nearest filter is applied. Most of the time, especially if some contrast diagonals are involved (including character glyphs) upscaling results are no ok.  Also, doc-view suffers from this, most pdf files viewed inside Emacs looks no ok.

On the other hand the bug report complains that scaled up
pixel art looks abominable with nearest, so clearly there's a
difference of opinion.

Just get rid of any xpm :) Emacs has nice support for SVG after all, we can write xpm to svg converter to keep pixel art precision.

I don't know whether "good" is a better compromise, I suspect it looks
quite like "best".
I don't know what the best option is, I suspect there's no clear
one-size-fits-all winning strategy.

Or maybe we can make the transformation filter configurable, so it could be changed from elisp side?

--
lg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]