From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Unknown Newsgroups: gmane.emacs.bugs Subject: bug#38109: Updated Emacs to HEAD, consistently not scaling now Date: Fri, 08 Nov 2019 22:03:17 +0100 Organization: koldfront - analysis & revolution, Copenhagen, Denmark Message-ID: <87h83egjxm.fsf@tullinup.koldfront.dk> References: <87imnvfl3h.fsf@tullinup.koldfront.dk> <87imnvidbi.fsf@tullinup.koldfront.dk> <87o8xn73xi.fsf@gnus.org> <878soric89.fsf@tullinup.koldfront.dk> <87k18b739d.fsf@gnus.org> <87o8xn9vzk.fsf@tullinup.koldfront.dk> <20191108193407.GA42511@breton.holly.idiocy.org> Reply-To: =?UTF-8?Q?Adam=20Sj=C3=83=C2=B8gren=20=3Casjo=40k?= =?UTF-8?Q?oldfront=2Edk=3E?= Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="208770"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 38109@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 08 22:04:25 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iTBQa-000s16-J1 for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Nov 2019 22:04:20 +0100 Original-Received: from localhost ([::1]:60482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTBQY-0003LA-M6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 08 Nov 2019 16:04:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54748) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iTBQM-0003Iv-W5 for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2019 16:04:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iTBQL-0007e3-Rk for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2019 16:04:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38947) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iTBQJ-0007co-7e for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2019 16:04:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iTBQJ-0002ni-29 for bug-gnu-emacs@gnu.org; Fri, 08 Nov 2019 16:04:03 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87imnvfl3h.fsf@tullinup.koldfront.dk> Resent-From: Adam =?UTF-8?Q?Sj=C3=B8gren?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Nov 2019 21:04:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38109 X-GNU-PR-Package: emacs Original-Received: via spool by 38109-submit@debbugs.gnu.org id=B38109.157324700710700 (code B ref 38109); Fri, 08 Nov 2019 21:04:03 +0000 Original-Received: (at 38109) by debbugs.gnu.org; 8 Nov 2019 21:03:27 +0000 Original-Received: from localhost ([127.0.0.1]:47765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTBPi-0002mV-SQ for submit@debbugs.gnu.org; Fri, 08 Nov 2019 16:03:27 -0500 Original-Received: from virgil.koldfront.dk ([2.110.51.43]:38688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTBPg-0002mG-FA for 38109@debbugs.gnu.org; Fri, 08 Nov 2019 16:03:25 -0500 Original-Received: from tullinup.koldfront.dk (tullinup.koldfront.dk [192.168.1.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by virgil.koldfront.dk (Postfix) with ESMTPS id 84BBD10EA091B; Fri, 8 Nov 2019 22:03:17 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 virgil.koldfront.dk 84BBD10EA091B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=koldfront.dk; s=mail; t=1573246997; bh=lzChJXtqZSUq/gvylqnVzGHKi7zEQfxXMW7y1yoVYcg=; h=From:To:Cc:Subject:References:Date:From; b=CQ+YKKvIf2HTx3MVUoupgDR+7jYrovcNTcOBb644qgE+EjMDUzprZA9AKWgA7octh +7lbZKzOqRgUUnsO0/Dw05ed1R7MyP013wibeFeTr5EB37S8A7qqXtHYJoXHyoleVG HTyKkvmgTghfw61UITggUuBdpTVGdRhz5PDKfcVlUYnHs1lkoiZ37xnZ+7H7OQ68g8 v/RRn0RamUsPsKpCIu6IDW5/j5V7UnMPUttCKdYQd7Y/WLVq5enga7BRcSiagESvr0 FVB7e/WFjx7fRLlOesPviUg48gpIn8iJZEBaWxDskVHzOtnrvLVoTeNkoE0FeCjrEy PpOEARE4H3YgQ== Original-Received: by tullinup.koldfront.dk (Postfix, from userid 1000) id 6EFE32018ACAA; Fri, 8 Nov 2019 22:03:17 +0100 (CET) OpenPGP: id=476630590A231909B0A0961A49D0746121BDE416; url=https://asjo.koldfront.dk/gpg.asc X-Now-Playing: A Winter's Sky, We are The Pipettes (The Pipettes) X-Hashcash: 1:21:191108:alan@idiocy.org::QnyFnZjf15LAAHgv:003z1B X-Hashcash: 1:21:191108:38109@debbugs.gnu.org::ERPzgWXupOnexmiJ:0000000000000000000000000000000000000000NmEg X-Hashcash: 1:21:191108:larsi@gnus.org::XdW/XeJUsyRxefDs:000h7sp X-Face: )qY&CseJ?.:=8F#^~GcSA?F=9eu'{KAFfL1C3/A&:nE?PW\i65"ba0NS)97, Q(^@xk}n4Ou rPuR#V8I(J_@~H($[ym:`K_+]*kjvW>xH5jbgLBVFGXY:(#4P>zVBklLbdL&XxL\M)%T}3S/IS9lMJ ^St'=VZBR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Original-From: =?UTF-8?Q?Adam=20Sj=C3=83=C2=B8gren=20via=20=22Bu?= =?UTF-8?Q?g=20reports=20for=20GNU=20Ema?= =?UTF-8?Q?cs=2C?= =?UTF-8?Q?=20the=20Swiss=20army=20knife?= =?UTF-8?Q?=20of=20text=20editors=22=20=3Cbu?= =?UTF-8?Q?g=2Dgnu=2Demacs=40gnu=2Eorg=3E?= Xref: news.gmane.org gmane.emacs.bugs:171268 Archived-At: Alan writes: [...] > There should be an error message somewhere telling you that Emacs > doesn=E2=80=99t support scaling with that bit depth. Indeed there is for the: /tmp/wry.png: PNG image data, 16 x 16, 4-bit colormap, non-interlaced image. But not for the .xpm. Ah, but xpm doesn't go through image_create_x_image_and_pixmap_1(), so that explains that. > I guess it should be simple enough to add 4 and 1 bit to the above > which I hope would cover some of the above cases... Yes, with this patch: diff --git a/src/image.c b/src/image.c index 870f008b14..bb76e9db60 100644 --- a/src/image.c +++ b/src/image.c @@ -2585,7 +2585,7 @@ image_create_x_image_and_pixmap_1 (struct frame *f, i= nt width, int height, int d { if (depth <=3D 0) depth =3D DefaultDepthOfScreen (FRAME_X_SCREEN (f)); - if (depth =3D=3D 32 || depth =3D=3D 24 || depth =3D=3D 8) + if (depth =3D=3D 32 || depth =3D=3D 24 || depth =3D=3D 8 || depth = =3D=3D 4 || depth =3D=3D 1) { XRenderPictFormat *format; XRenderPictureAttributes attr; @@ -2600,12 +2600,16 @@ image_create_x_image_and_pixmap_1 (struct frame *f,= int width, int height, int d format =3D XRenderFindStandardFormat (display, depth =3D=3D 32 ? PictStanda= rdARGB32 : depth =3D=3D 24 ? PictStan= dardRGB24 - : PictStandardA8); + : depth =3D=3D 8 ? PictStan= dardA8 + : depth =3D=3D 4 ? PictStan= dardA4 + : PictStandardA1); *picture =3D XRenderCreatePicture (display, *pixmap, format, 0, = &attr); } else { - image_error ("Specified image bit depth is not supported by XRen= der"); + Lisp_Object depth_err; + XSETINT(depth_err, depth); + image_error ("Specified image bit depth (%d) is not supported by= XRender", depth_err); *picture =3D 0; } } the error in *Messages* doesn't appear. However the png-image is still not scaled, and still shown in the larger canvas. I apparently haven't got Cairo enabled in my build, maybe that's a problem? asjo@tullinup:/usr/src/emacs$ grep CAIRO src/config.h /* #undef USE_CAIRO */ An observation: when displaying the colormapped .png, image_create_x_image_and_pixmap_1() is called twice, the first time depth is <=3D 0, and the second time it isn't.