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: Sun, 7 Mar 2021 20:45:59 +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="1099"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel To: Evgeny Zajcev Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Mar 07 21:48:11 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 1lJ0Ju-00009F-W0 for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Mar 2021 21:48:10 +0100 Original-Received: from localhost ([::1]:39380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJ0Ju-0005ys-1a for ged-emacs-devel@m.gmane-mx.org; Sun, 07 Mar 2021 15:48:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJ0I4-0005F9-Ad for emacs-devel@gnu.org; Sun, 07 Mar 2021 15:46:17 -0500 Original-Received: from outbound.soverin.net ([2a01:4f8:fff0:2d:8::218]:38231) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJ0Hy-0003tf-MP for emacs-devel@gnu.org; Sun, 07 Mar 2021 15:46:15 -0500 Original-Received: from smtp.soverin.net (unknown [10.10.3.28]) (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 E0B8760142 for ; Sun, 7 Mar 2021 20:46:02 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1615149962; bh=gpJEwHPjA3Uja6D8SuDc6WAnJASYmuW6E4D71OkpjxM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B2EdWKJkctvguEcTi3ajBBL1ANIMduV5gFUKq95rjTQtF85TNAAXlHMbpNTNEObzc clyjRjdD7bij3A5QBqvFtJSQp7t4azAgqd/w8blCJttpdtgDwOMp/myDcfyi1EWtP6 WME4HSQclDl5S34pGB/pwToh4ADGr1Zyj/1uSBOoj+ErgqnFXIvMjZ/ety/IOYEu/o AvKF+a7+RaMvphluPFoBViyhr/qmYS3Q7CWn2TAWWWwUVRJsB3HMb/5r52gXMWzVPl W0rcnx/8nf7SYa7P9TRn9ZRJob+aCMpymFVlob3SaL+twMZfrIYWmDcRYg6nDPV6l9 IQpQjynbVSieg== Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id 1A551202AD1C31; Sun, 7 Mar 2021 20:45:59 +0000 (GMT) Mail-Followup-To: Alan Third , 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:266149 Archived-At: 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 when using the "best" filter, but most other types of images look OK when using nearest. 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. 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. -- Alan Third