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#56182: 28.1; Display of SVG file with transparent background is incorrect Date: Sat, 9 Sep 2023 13:09:44 +0100 Message-ID: References: <82k096lgj5.fsf@gmail.com> <87a6a2s9e2.fsf@gnus.org> <83czexaycd.fsf@gnu.org> <82pmis3a7g.fsf@gmail.com> 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="23506"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , Lars Ingebrigtsen , 56182@debbugs.gnu.org To: Pascal Quesseveur Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 09 14:10:12 2023 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 1qewmx-0005uN-Mg for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 09 Sep 2023 14:10:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qewmn-0001a4-Pe; Sat, 09 Sep 2023 08:10:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qewmm-0001Zv-A1 for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 08:10:00 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qewmm-0008Jc-2L for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 08:10:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qewmo-0008L3-GR for bug-gnu-emacs@gnu.org; Sat, 09 Sep 2023 08:10: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: Sat, 09 Sep 2023 12:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56182 X-GNU-PR-Package: emacs Original-Received: via spool by 56182-submit@debbugs.gnu.org id=B56182.169426140132042 (code B ref 56182); Sat, 09 Sep 2023 12:10:02 +0000 Original-Received: (at 56182) by debbugs.gnu.org; 9 Sep 2023 12:10:01 +0000 Original-Received: from localhost ([127.0.0.1]:46337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qewmm-0008Kj-GV for submit@debbugs.gnu.org; Sat, 09 Sep 2023 08:10:00 -0400 Original-Received: from dane.soverin.net ([2a10:de80:1:4092:b9e9:2294:0:1]:54745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qewmh-0008KS-DJ for 56182@debbugs.gnu.org; Sat, 09 Sep 2023 08:09:59 -0400 Original-Received: from smtp.soverin.net (c04smtp-lb01.int.sover.in [10.10.4.74]) (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 dane.soverin.net (Postfix) with ESMTPS id 4RjWxk5nFnz2xN7; Sat, 9 Sep 2023 12:09:46 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.99]) by soverin.net (Postfix) with ESMTPSA id 4RjWxk3Cp7zCR; Sat, 9 Sep 2023 12:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1694261386; bh=SZWI7L1mU0i9GAYHL1pS5mbgyP7VYRL7ADmelPNCxFc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=D/AusGnTu7PGPWXf5uxksog1rntz1Wn+mr0sZYgkcmYbxc3RPYnsgz/GsGbeOUI5b qyXYGcfAz0BDNXYgNbLAFhvwV7veeqTAbbebggYNO2GE+ZhgKp8ld0/nFJh4K/AUL8 8PgcubMYRJ9kuJcNwM9jsL6xWVpDalKlExYPkXDCjk7xP4zF6plO2e5ipebhm5LVqJ cB3tMA1Vfpdw1sV9TAd4rpjnLRfHB9boD8mLj7iuVRjZW21I2j9SpT/VMSUNGAAXN4 UER6BLBmpqz54RsI2ggyFpkcfMiHDqSdLNbH3y4ZvP/XikHKg91K5Qe+zDqTSPEgep d3iF4TuaSqAiA== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.96) (envelope-from ) id 1qewmW-001QkZ-2g; Sat, 09 Sep 2023 13:09:44 +0100 X-Soverin-Authenticated: true Mail-Followup-To: Alan Third , Pascal Quesseveur , Eli Zaretskii , Lars Ingebrigtsen , 56182@debbugs.gnu.org Content-Disposition: inline In-Reply-To: <82pmis3a7g.fsf@gmail.com> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:269855 Archived-At: On Tue, Jun 28, 2022 at 08:38:11PM +0200, Pascal Quesseveur wrote: > From what I understand the way to deal with background transparency of > SVG images has changed in version 28.1 in function svg_load_image > (comments about opacity are still there but I think they are > irrelevant). Now the SVG image is encapsulated in another SVG image in > which a rect element is defined with the background color of the > image. > > I don't know why it doesn't work on the W10 computers I work on. I > don't know if the problem comes from this modificatino either. It > seems to me that the displayed color is BGR instead of RGB and the > screen gamma correction is not applied. Apologies for leaving this so long. Is this an issue for *all* Windows machines? The documentation for COLORREF[1] suggests that Windows uses a byte format for *all* colours of 0x00BBGGRR, which would explain this, but I thought it worked fine on some machines? Alternatively, I'm looking at the wrong documentation, however it appears the code in w32term.c uses this COLORREF for colours as defined in a face, so I think it's the right thing. If this is right and Windows always uses this format, all we need to do is format the SVG colour differently on Windows. [1] https://learn.microsoft.com/en-gb/windows/win32/gdi/colorref?redirectedfrom=MSDN -- Alan Third