From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: Image transformation filter for upscaled images Date: Mon, 8 Mar 2021 18:58:01 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39994"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Evgeny Zajcev , emacs-devel To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 08 19:59:41 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJL6Q-000ADJ-Un for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 19:59:38 +0100 Original-Received: from localhost ([::1]:59332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJL6P-0006uu-SB for ged-emacs-devel@m.gmane-mx.org; Mon, 08 Mar 2021 13:59:37 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJL52-0005XA-15 for emacs-devel@gnu.org; Mon, 08 Mar 2021 13:58:12 -0500 Original-Received: from outbound.soverin.net ([2a01:4f8:fff0:2d:8::218]:60995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJL4y-0001IL-81 for emacs-devel@gnu.org; Mon, 08 Mar 2021 13:58:11 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 412BA600F5 for ; Mon, 8 Mar 2021 18:58:05 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1615229884; bh=OKNIiyrU+LPf18XHH17wsC467yFea4CP5Xwa+764eYQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Mp/S5jKSjtUuAW004/J2vfW4UimMaLm9VxvBTKCO7MI1ZlRcefOxDNfqtm7uJKLgR 77f6qx9NIjENNXgql3AZvIUXKkIlwRGKILMlvLNZTU/L+QzAjG0/ZZf532ZrrOVlJX K9tlRgM+OXR8/k339XfR9vXj/LwZtSB7A+6lPaySQErHaK2Iv1K3EKl0h1Cy07EP8+ 0wM6ZZYoid6L3TFNX9AHslg2Kfhp0upLvl0dVO00y3GGfgkxDL3bDEVfX8crLrK+MW kdJAArqYXusFip8GkS2HauD00Yx2SqLN9l1W+x+iU+9BMenK5C1fZ/t/opxsqYRrkU L2JFaxLCXZeBg== Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id C4740202AD3908; Mon, 8 Mar 2021 18:58:01 +0000 (GMT) Mail-Followup-To: Alan Third , Stefan Kangas , Evgeny Zajcev , emacs-devel Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=2a01:4f8:fff0:2d:8::218; envelope-from=alan@idiocy.org; helo=outbound.soverin.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:266218 Archived-At: On Sun, Mar 07, 2021 at 05:27:44PM -0600, Stefan Kangas wrote: > Evgeny Zajcev 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