From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Image transformation filter for upscaled images Date: Tue, 09 Mar 2021 18:04:59 +0100 Message-ID: <87h7lkl0lg.fsf@gnus.org> References: <871rcpo3nm.fsf@gnus.org> <87v9a1l4d7.fsf@gnus.org> <837dmgqxrw.fsf@gnu.org> <87v9a0l97b.fsf@gnus.org> <83y2ewp9k6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6939"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: alan@idiocy.org, lg.zevlg@gmail.com, stefankangas@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 09 20:33:35 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 1lJi6o-0001ep-2T for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Mar 2021 20:33:34 +0100 Original-Received: from localhost ([::1]:51966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJi6n-0008Vs-1M for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Mar 2021 14:33:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJfnR-0004BS-Jo for emacs-devel@gnu.org; Tue, 09 Mar 2021 12:05:25 -0500 Original-Received: from quimby.gnus.org ([2a01:4f9:2b:f0f::2]:42906) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJfnE-0000m1-W5; Tue, 09 Mar 2021 12:05:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=VVbDKN9Xppd5ZJ5Mw+pSBdbJQxdDXJtoQ9OKF/YkdZM=; b=FPlBHzcUT2O7U1OTxNbSyToNyk hVNpoKv7EaY1FrHQhw68grOso5RFRVxXCZ5rFCp7+YZeaov5IHIktVl36yHd2DR7WsMZKDv2PqPax X8K2vvYk+bfx2Zt4OdWQgRewbW7+2YePZottWz5mxsHpKA3GPtLR9ziVB6L/ezdKHZF8=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJfn3-0008Vn-B4; Tue, 09 Mar 2021 18:05:07 +0100 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAJ1BMVEUaCQkkERCth3TV sprdj2WfTC/SZTpdKyOaMxeeaFY4KChzU0z///88lFOvAAAAAWJLR0QMgbNRYwAAAAd0SU1FB+UD CRA4HzZEB7UAAAGrSURBVDjL5ZKxb+IwFMbjCSmTPVFl7NGeQqdTOjG2FsPNZ4LF2NQntjJEhnYO 8YwaRa8s8YTk8SRUofvn6kASchUdmO+TM8S/972X9/Ic57TIF/cOOhucr/Nr/AMQKYXtqfr4dtlW EAQ/bEwJeiMhVaUxAxENrLcENx3pkK5Mk3Cj0rQrZb8CV3M5Q/MkZEyF83QeHgHbvUsOPgBkMpVp twFxyCc7AA55PFYq3dQglxIYwF+erW02pS5+VuD7RtossN6yyftCqHHcrxq8Wth4zvOY5Ts+VKF6 qxq8BljZyiwD2PJR8jvro4OjN+Gwtp4t8GwHgvoDdHD0rIEvfJsP/F+v0+llC+QsHj6uVndZAkn8 OkCHWfkvbLxMhKD00X7sckRrcK1G9n0Y3UZCLEU0va9BT0RUPNhx04BSeh8E9XT/wCe9EXJ64VAF zKzwjHk2BpmDZhXQz08WGG0co/X+1A7XLXChXVdj7bmuV9TgpeMVRWE8Vxfa8zre0z4VdsrnuE0Y E1QVx+R4TRqVDtwA0gLWhi3BzSbWYL+V7dA2OKX/AKAvQPMvPnk/AHH4uW7wuC01AAAAJXRFWHRk YXRlOmNyZWF0ZQAyMDIxLTAzLTA5VDE2OjU2OjMxKzAwOjAwDMJkvAAAACV0RVh0ZGF0ZTptb2Rp ZnkAMjAyMS0wMy0wOVQxNjo1NjozMSswMDowMH2f3AAAAAAASUVORK5CYII= X-Now-Playing: The Iceburn Collective's _Meditavolutions_: "Sphinx" In-Reply-To: <83y2ewp9k6.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 09 Mar 2021 18:37:45 +0200") Received-SPF: pass client-ip=2a01:4f9:2b:f0f::2; envelope-from=larsi@gnus.org; helo=quimby.gnus.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:266250 Archived-At: Eli Zaretskii writes: >> There's no single value that will give good results in all cases. >> Adding a variable to control the default is all well and good, but it's >> not sufficient. > > Neither a variable nor an image attribute? (I suggested both.) Then > what would you suggest to do to resolve this? Sorry; missed that you also mentioned an image attribute, which would be fine. 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. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no