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.bugs Subject: bug#38394: Fwd: Use different image filtering when zooming in vs zooming out Date: Sat, 15 Aug 2020 01:10:17 +0200 (CEST) Message-ID: <20200814231014.GA44817@breton.holly.idiocy.org> References: <20200814202032.GD44359@breton.holly.idiocy.org> <4be3a019-fcad-033a-35cf-5a67a23bb953@orange.fr> 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="8044"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 38394@debbugs.gnu.org To: David Ponce Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 15 01:11:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1k6iqu-00021i-IJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Aug 2020 01:11:12 +0200 Original-Received: from localhost ([::1]:59304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k6iqt-0002tu-Gt for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 14 Aug 2020 19:11:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49002) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k6iqk-0002tk-Qw for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2020 19:11:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:42517) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k6iqk-0002Db-IM for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2020 19:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k6iqk-0006BQ-DX for bug-gnu-emacs@gnu.org; Fri, 14 Aug 2020 19:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 14 Aug 2020 23:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38394 X-GNU-PR-Package: emacs Original-Received: via spool by 38394-submit@debbugs.gnu.org id=B38394.159744662623722 (code B ref 38394); Fri, 14 Aug 2020 23:11:02 +0000 Original-Received: (at 38394) by debbugs.gnu.org; 14 Aug 2020 23:10:26 +0000 Original-Received: from localhost ([127.0.0.1]:54062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6iq9-0006AX-V5 for submit@debbugs.gnu.org; Fri, 14 Aug 2020 19:10:26 -0400 Original-Received: from mailout-l3b-97.contactoffice.com ([212.3.242.97]:45770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6iq8-0006AL-Fc for 38394@debbugs.gnu.org; Fri, 14 Aug 2020 19:10:24 -0400 Original-Received: from smtpauth1.co-bxl (smtpauth1.co-bxl [10.2.0.15]) by mailout-l3b-97.contactoffice.com (Postfix) with ESMTP id DE7EF1EDF; Sat, 15 Aug 2020 01:10:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1597446618; s=20200222-6h9o; d=idiocy.org; i=alan@idiocy.org; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:In-Reply-To; l=747; bh=gyxk3H+97jkDRkFBLr8oh1uohTDqvZP5hELe7cBjF8Q=; b=k7vSY4/+i8jXRHmIh7O9fji0a+TpmagJuTw3ZfB4Vo0Y9+dIgVtvNtUb/uSMB++B /7Ve5rXcOr4U9K+hwZUGjUUVwPjlvXTPUJMWLZx9kPgMR7f312gohdi/sU7swICFd+W goaS0zqxoT/rWkjNmnG/mVBQ7RmwQmnUgnXoDRJGu5mPTgsUt9swG5f7hfjwYZly9L0 fPEQ9RLIvFPj4BQuCIulO9QC3U56riHbDRPv6i7RhJ/qygXvld6y0aS7rGEIz3lw15q OzZM7zrC2v/yMsUkdWE9itwQKUIZK207QP09au7KwKa+otdp3+evLL23f97KyhcfPeY XxNdVPM4rQ== Original-Received: by smtp.mailfence.com with ESMTPA ; Sat, 15 Aug 2020 01:10:15 +0200 (CEST) Original-Received: by breton.holly.idiocy.org (Postfix, from userid 501) id B67D220248A189; Sat, 15 Aug 2020 00:10:14 +0100 (BST) Mail-Followup-To: Alan Third , David Ponce , 38394@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <4be3a019-fcad-033a-35cf-5a67a23bb953@orange.fr> X-ContactOffice-Account: com:241649512 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:185181 Archived-At: On Fri, Aug 14, 2020 at 11:14:22PM +0200, David Ponce wrote: > On 14/08/2020 22:20, Alan Third wrote: > > Maybe we should only go to nearest neighbour when the scaling is >= 2? > > Or greater than the scale factor? Hmm, I'm not sure what's best here. > > > > Not sure either. > Maybe an option could define the min scale to go to nearest neighbour? > By default (nil?) it could be the scale factor? > > An image attribute could make sense too, similar to :scale, but for smoothing. Can you try replacing this line (2125): bool scale_down = (width < img->width) || (height < img->height); with bool scale_down = (double)width/img->width < 1.2; and have a play about with the number and see how it looks? -- Alan Third