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: Alan Third
Subject: Re: Image transformation filter for upscaled images
Date: Mon, 8 Mar 2021 18:58:01 +0000

On Sun, Mar 07, 2021 at 05:27:44PM -0600, Stefan Kangas wrote:
> Evgeny Zajcev <lg.zevlg@gmail.com> writes:
> 
> >> The reason nearest was chosen was because scaled up pixel art (emojis,
> >> mostly, like etc/images/smilies/wry.xpm) looked abominable
> 
> Doesn't it seem like a bad trade-off to improve rendering of smileys at
> the cost of rendering PDF:s worse?  I rarely if ever use doc-view, but
> testing it now seems to produce less than stellar results (i.e. the text
> is barely readable).

This is the first I've heard of any complaints about the rendering of
PDFs, and I don't view them in Emacs. Certainly nobody brought it up
when the change was implemented, so the trade-off wasn't considered.

I don't feel strongly about this. Can someone try the "best" filter
and see if good is an improvement over it? We use best for scaling
down, so if we're happy with best for scaling up then we can just
remove the code that sets it completely. Or go with good across the
board, but best is, y'know, better. ;)

Remove the ternary operator in this line (image.c:2372), and probably
the one just below on line 2378 as well:

          XRenderSetPictureFilter (FRAME_X_DISPLAY (f), img->mask_picture,
                                   scale_down ? FilterBest : FilterNearest, 0, 
0);

> > 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.
> 
> Is there a way to convert from XPM automatically, or are you saying you
> volunteer to make the SVG:s?

There are only 12 emoji XPMs, so trying to copy them directly into SVG
would probably not take too much effort... They might not look very
good, though. ;)

-- 
Alan Third



reply via email to

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