From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Image transformation filter for upscaled images Date: Tue, 09 Mar 2021 20:01:50 +0200 Message-ID: <83pn08p5o1.fsf@gnu.org> References: <871rcpo3nm.fsf@gnus.org> <87v9a1l4d7.fsf@gnus.org> <837dmgqxrw.fsf@gnu.org> <87v9a0l97b.fsf@gnus.org> <83y2ewp9k6.fsf@gnu.org> <87h7lkl0lg.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7525"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alan@idiocy.org, lg.zevlg@gmail.com, stefankangas@gmail.com, emacs-devel@gnu.org To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 09 20:42:28 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 1lJiFQ-0001qu-8y for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Mar 2021 20:42:28 +0100 Original-Received: from localhost ([::1]:46938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJiFP-0001b3-4r for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Mar 2021 14:42:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJgg7-0006WC-St for emacs-devel@gnu.org; Tue, 09 Mar 2021 13:02:00 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42707) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJgg6-0001Gj-T3; Tue, 09 Mar 2021 13:01:54 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2347 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1lJgg6-0004qL-8L; Tue, 09 Mar 2021 13:01:54 -0500 In-Reply-To: <87h7lkl0lg.fsf@gnus.org> (message from Lars Ingebrigtsen on Tue, 09 Mar 2021 18:04:59 +0100) 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:266251 Archived-At: > From: Lars Ingebrigtsen > Cc: alan@idiocy.org, lg.zevlg@gmail.com, stefankangas@gmail.com, > emacs-devel@gnu.org > Date: Tue, 09 Mar 2021 18:04:59 +0100 > > Thinking a bit more about this, I wonder whether a general solution is > kinda-sorta possible anyway. That is, having a function that returns > what algorithm to use. We normally want shrinking the image to always > use `best', and enlarging an image slightly to use `good' or `best' > (that's the issue with doc-view, I think? we're rendering at one size > and then enlarging it on HiDPI screens? I haven't actually debugged > it), and enlarging more than (say) 3x in size to use nearest > neighbour... > > Having a variable (that can be a function that returns the algo to > use, or be one of the symbols) would allow us to experiment with this > more easily and see whether we can come up with something that works for > most people out of the box. If we can DTRT in most cases by default, we should, of course. I was under the impression that the "best" choice depended on what people did with images most of the time and on personal preferences.