From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Image transformation filter for upscaled images Date: Wed, 10 Mar 2021 11:23:11 +0700 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33658"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Emacs developers , lg.zevlg@gmail.com, Alan Third , Stefan Kangas To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 10 05:24:24 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 1lJqOV-0008a8-ON for ged-emacs-devel@m.gmane-mx.org; Wed, 10 Mar 2021 05:24:23 +0100 Original-Received: from localhost ([::1]:55938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJqOU-0008JP-QI for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Mar 2021 23:24:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJqNf-0007Mh-6J for emacs-devel@gnu.org; Tue, 09 Mar 2021 23:23:31 -0500 Original-Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f]:34606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJqNY-0003aZ-UP; Tue, 09 Mar 2021 23:23:30 -0500 Original-Received: by mail-ua1-x92f.google.com with SMTP id 101so5332830uag.1; Tue, 09 Mar 2021 20:23:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/G9V38DZkKyP5twzXtscp/Xbn84/RzjcJqgEoMo1bTU=; b=Bg/AmYHjmBI1LQ26VDBC+YsnpRNgFc44Kv4Ioop0LWP4oX9xLhsp8RKYM/7qVu37uH fZIQJXsj7O1sDGM6U9TibtYA3+Ku/9qbMgoU7aXfH2NlJ4k0YRd86kpooOpTd1kV4vqV 4A73MNQCPKFk3vmnzVybIBw4D5jk2OVdIkqyK2cl5AJzD53tIIdVuLW9/7ZaA3tz8Fu9 IYQ6vlEO8E669B0YZ3nAJCb2setOmtPBTY83L/WG3BWFh2uXThJOk/fPzGdTZ//m+RKl 4z2+AvK7R3sJyitBHqe7YtSyu5JZa4+wS+9atEWgnBR0JImVyQWFwNxXBHzhKvVyOWka L1Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/G9V38DZkKyP5twzXtscp/Xbn84/RzjcJqgEoMo1bTU=; b=kSseKhjPHw0KfDdGP9TDxzPPbj3pGshgSzvDtBXPAgHRYBjTYmCXYVWc9LB8qkLBiB BxdQYzSpwC5X06uTUAKEeU96AEkHkoWzFug+R1HosIT5jyo6yWFQUe7LsEivYwqPKZbn FQjGelAGfsqifqt6t1p8VPGpKSIKJbNghAFsXJcedWGALekOHq7YqyaupZ8KPHsipjBB jSuZB6516wlOiRLcgMZ1bMSvbHj7ZdGLxayJ178WHsext8rebIT5yqOVpeaCwBJSZ6q8 aUiMqtEtiFl4Jwq/YaufrbvR55s3cFQvBm5kBUiCQUP8hCegIwCSHG+h/KPkVcDICm7N 3SLQ== X-Gm-Message-State: AOAM530TsV+EtDqV26Qcb4pbNOuYKwt5qchFdSM58VkQx+mShnEQisZq N45yskwTMa0LmjKDgEBvkUGZwsvjT/yuAGnKd1A= X-Google-Smtp-Source: ABdhPJw8Xd9zp84Jh0zAdsXjMHd2KqhCgcNRrOzR4Hon1uuTiKEyie8/pXMTu0STfFHcWxrjkLD0AeD9Tf5p1ARUvzc= X-Received: by 2002:ab0:2056:: with SMTP id g22mr723576ual.24.1615350202827; Tue, 09 Mar 2021 20:23:22 -0800 (PST) In-Reply-To: <87h7lkl0lg.fsf@gnus.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::92f; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x92f.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:266262 Archived-At: On Wed, 10 Mar 2021 at 02:32, Lars Ingebrigtsen wrote: > 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... Nearest-neighbor scaling when enlarging by exactly 2x feels very good, too.