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: Tue, 28 Jun 2022 20:45:17 +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=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26159"; 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 Tue Jun 28 21:46:15 2022 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 1o6HA7-0006Ze-7C for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Jun 2022 21:46:15 +0200 Original-Received: from localhost ([::1]:57218 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o6HA6-0008Nf-59 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Jun 2022 15:46:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6H9u-0008Lq-Nv for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2022 15:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34240) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o6H9u-0004PN-FJ for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2022 15:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o6H9u-0001eT-BX for bug-gnu-emacs@gnu.org; Tue, 28 Jun 2022 15:46: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: Tue, 28 Jun 2022 19:46: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.16564455446318 (code B ref 56182); Tue, 28 Jun 2022 19:46:02 +0000 Original-Received: (at 56182) by debbugs.gnu.org; 28 Jun 2022 19:45:44 +0000 Original-Received: from localhost ([127.0.0.1]:56370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6H9b-0001dp-DD for submit@debbugs.gnu.org; Tue, 28 Jun 2022 15:45:43 -0400 Original-Received: from outbound.soverin.net ([185.233.34.21]:53873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6H9K-0001d9-K0 for 56182@debbugs.gnu.org; Tue, 28 Jun 2022 15:45:42 -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 outbound.soverin.net (Postfix) with ESMTPS id 4LXZnY02mSzBs; Tue, 28 Jun 2022 19:45:21 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1656445520; bh=2iFhtnui/c9BMQ6ORFcsDa6/x7zCf1ASIh0+bH8iuW0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UNkSmgEPJ8htVhUiZzM8t35gSXxCpfWVIBgTtVBwciMXNbXAxm22xCpT5dyhCkpHN Zu6dZQlhjBd7s0haZ1FRt+MueQPt3IkHpiXMsXonK7vYyi8OH7oMxYFwc8wXxuz9En 3l3om0Gtxhuy/w2k7ig3XINxrTJl+7SmSnwiiErnf9bBepiBlY/3Ac43lElliYmH2R 6T13RWBI0H225P9Q470pdbz8H/fcAMc2DFF8sEnJwLA+VwinwOm76m2YoH5NRNsrRt MOj8Xo81P9dAXBkhnF9HYHJHWFVGmCpbn+CNnwsB7ki792o/F7jME8MtdlR7tRDZvH uF1Go/kOYP/yA== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95) (envelope-from ) id 1o6H9B-000Fn3-RQ; Tue, 28 Jun 2022 20:45:17 +0100 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" Xref: news.gmane.io gmane.emacs.bugs:235567 Archived-At: On Tue, Jun 28, 2022 at 08:38:11PM +0200, Pascal Quesseveur wrote: > >"AT" == Alan Third a écrit : > > AT> I can't reproduce it. > > 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. Can you try using describe-face to compare the face where the image is and another place where the background colour is shown correctly? > 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. For what it's worth I managed > to work around the problem in lisp. With version 27.1 I had > implemented an advice to improve the taking into account of the > background color in the style of SVG file. So I extended that advice > to solve my problem. *scratches head* Eli, do we need to decode the "unsigned long" colours in a special way on Windows? It could be I've missed a vital step and am using them incorrectly. So if the colour is defined in BGR byte order, and I then use the unsigned long directly in a printf("#%06X", colour) style, that's likely to be wrong, yes? -- Alan Third