From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Testing native image scaling Date: Sat, 19 Jan 2019 11:31:34 +0200 Message-ID: <83fttpat8p.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1547890233 4191 195.159.176.226 (19 Jan 2019 09:30:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2019 09:30:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 19 10:30:29 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 esmtp (Exim 4.84_2) (envelope-from ) id 1gkmxP-0000tD-QT for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2019 10:30:27 +0100 Original-Received: from localhost ([127.0.0.1]:53425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkmzW-0001RW-VI for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2019 04:32:38 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48043) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkmyp-0001RL-P2 for emacs-devel@gnu.org; Sat, 19 Jan 2019 04:31:56 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gkmyp-0002RI-9X; Sat, 19 Jan 2019 04:31:55 -0500 Original-Received: from [176.228.60.248] (port=4724 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gkmyo-0002TX-TS; Sat, 19 Jan 2019 04:31:55 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:232476 Archived-At: 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 tried to implement this for MS-Windows, but I guess my understanding of the internal workings of this is incomplete/incorrect, or my code is buggy (or both), because I don't seem to be able to cause Emacs to exercise the code when the original image's size and the size requested by scaling differ. For example, I thought that when scaling is requested, x_set_image_size should be called and compute image dimensions different from the original img->height and img->width, but I seem to be unable to see this. What am I missing? Could you perhaps describe the flow of calls when, e.g., the user types '+' on an image in image-mode, and Emacs scales the image at point? Thanks. P.S. Incidentally, image-scaling-p is called in image.el also in context where we want to know whether an image can be rotated by 90 degrees, and native scaling doesn't support that, does it?