From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: Testing native image scaling Date: Wed, 27 Mar 2019 11:35:26 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: <83fttpat8p.fsf@gnu.org> <20190119214543.GA13967@breton.holly.idiocy.org> <834la3b9hd.fsf@gnu.org> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="117181"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.3 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Cc: Alan Third , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Mar 27 03:35:46 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h8yPo-000UKk-9q for ged-emacs-devel@m.gmane.org; Wed, 27 Mar 2019 03:35:44 +0100 Original-Received: from localhost ([127.0.0.1]:40888 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8yPn-0006bI-B1 for ged-emacs-devel@m.gmane.org; Tue, 26 Mar 2019 22:35:43 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8yPc-0006aF-Cv for emacs-devel@gnu.org; Tue, 26 Mar 2019 22:35:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8yPb-0002pY-Ch for emacs-devel@gnu.org; Tue, 26 Mar 2019 22:35:32 -0400 Original-Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:50641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8yPZ-0002o3-2L; Tue, 26 Mar 2019 22:35:29 -0400 Original-Received: from mathent.math.s.chiba-u.ac.jp (mathent [192.168.32.5]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 770A3F08FF; Wed, 27 Mar 2019 11:35:26 +0900 (JST) (envelope-from mituharu@math.s.chiba-u.ac.jp) In-Reply-To: <834la3b9hd.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 133.82.132.2 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:234759 Archived-At: On Mon, 21 Jan 2019 01:05:18 +0900, Eli Zaretskii wrote: > > > Date: Sat, 19 Jan 2019 21:45:43 +0000 > > From: Alan Third > > Cc: emacs-devel@gnu.org > > > > On Sat, Jan 19, 2019 at 11:31:34AM +0200, Eli Zaretskii wrote: > > > Alan, could you please tell how you tested native image scaling with > > > the XRENDER extension, and perhaps show some Lisp or existing commands > > > you used for that? E.g., did the features in thumbs.el work for you > > > in a build without Imagemagick? > > > > I just used a fairly simple series of commands like this: > > > > (setq i (create-image "~/image.png" nil nil :scale 0.5)) > > (insert-image i) > > (setq ii (create-image "~/image.png" nil nil :scale 0.5)) > > (insert "\n") > > (insert-image ii) > > Thanks, this was very helpful. (Actually, just create-image with one > argument is enough: after inserting it, '+' or '-' on the image will > interactively resize it.) I think we should test sliced images as well. (insert-sliced-image (create-image "splash.png" nil nil :scale 0.5) nil nil 3 5) Actually, I suspect this does not work on W32 because the comparison with the original image size is made for s->slice.width (or height) rather than s->img->width (or height) as I just did for cairo code. Could you check it on W32? YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp