GNU bug report logs - #36315
27.0.50; SVG transparency handling is inaccurate

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Pip Cet <pipcet@HIDDEN>; dated Thu, 20 Jun 2019 20:28:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 36315 <at> debbugs.gnu.org:


Received: (at 36315) by debbugs.gnu.org; 24 Jun 2019 23:06:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 24 19:06:27 2019
Received: from localhost ([127.0.0.1]:58316 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hfY2d-0003fh-55
	for submit <at> debbugs.gnu.org; Mon, 24 Jun 2019 19:06:27 -0400
Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:53381)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mituharu@HIDDEN>) id 1hfY2Z-0003fU-7M
 for 36315 <at> debbugs.gnu.org; Mon, 24 Jun 2019 19:06:24 -0400
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 780E5F08E7;
 Tue, 25 Jun 2019 08:06:23 +0900 (JST)
 (envelope-from mituharu@HIDDEN)
Date: Tue, 25 Jun 2019 08:06:23 +0900
Message-ID: <wl7e9apor4.wl-mituharu@HIDDEN>
From: YAMAMOTO Mitsuharu <mituharu@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#36315: 27.0.50; SVG transparency handling is inaccurate
In-Reply-To: <83blymnaog.fsf@HIDDEN>
References: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
 <wl1rzjquv6.wl-mituharu@HIDDEN>
 <83blymnaog.fsf@HIDDEN>
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)
Organization: Faculty of Science, Chiba University
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: multipart/mixed; boundary="Multipart_Tue_Jun_25_08:06:23_2019-1"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36315
Cc: 36315 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--Multipart_Tue_Jun_25_08:06:23_2019-1
Content-Type: text/plain; charset=US-ASCII

On Tue, 25 Jun 2019 02:41:03 +0900,
Eli Zaretskii wrote:
> 
> librsvg on Windows is indeed build with libcairo, but if we don't get
> the --with-cairo option, we don't probe for the necessary functions,
> so at least theoretically we could have librsvg without Cairo.

I found librsvg actually requires libcairo, not optional.  Sorry for
my bogus question and thanks for testing the patch.

> The patch looks quite large.  Do we gain anything significant, apart
> of the appraisal of librsvg developers?

1. The current librsvg generates gdk-pixbuf via cairo image surface.
   So we can avoid unnecessarily intermediate data structure and
   roundtrip of alpha-component processing using cairo directly.
2. If configured --with-cairo, we can do further shortcut.  This is
   included in the patch attached to this mail.  Pip's patch is also
   reflected.
3. Image transformations can be applied when rendering to the cairo
   surface, not after generating bitmaps.  So we can take advantage of
   outline format and get better results of scaling.  This is not in
   the patch.  Probably it should be done by a separate commit after
   general image transformation code has been stabilized.

> I've built the patch on Windows (you forgot cairo_surface_destroy, so
> I needed to add it), but the result is strange, or maybe I don't
> understand what is expected.  I don't see any rectangle of color
> #f00000, I see the entire frame with black background, and a few
> characters in other colors.

When I tested Pip's test case, I started with emacs -Q -rv to avoid
text becomes invisible.  I could see a red rectangle on X11.  Do you
see such a rectangle without my patch?

				     YAMAMOTO Mitsuharu
				mituharu@HIDDEN

--Multipart_Tue_Jun_25_08:06:23_2019-1
Content-Type: application/octet-stream; type=patch; name="svg-cairo.diff"
Content-Disposition: attachment; filename="svg-cairo.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL3NyYy9pbWFnZS5jIGIvc3JjL2ltYWdlLmMKaW5kZXggN2I2NDhjNDZhZTku
Ljk1NjA0M2EyMjE5IDEwMDY0NAotLS0gYS9zcmMvaW1hZ2UuYworKysgYi9zcmMvaW1hZ2UuYwpA
QCAtOTM3OSwxNyArOTM3OSwyMCBAQCBERUZfRExMX0ZOICh2b2lkLCByc3ZnX2hhbmRsZV9nZXRf
ZGltZW5zaW9ucywKIERFRl9ETExfRk4gKGdib29sZWFuLCByc3ZnX2hhbmRsZV93cml0ZSwKIAkg
ICAgKFJzdmdIYW5kbGUgKiwgY29uc3QgZ3VjaGFyICosIGdzaXplLCBHRXJyb3IgKiopKTsKIERF
Rl9ETExfRk4gKGdib29sZWFuLCByc3ZnX2hhbmRsZV9jbG9zZSwgKFJzdmdIYW5kbGUgKiwgR0Vy
cm9yICoqKSk7Ci1ERUZfRExMX0ZOIChHZGtQaXhidWYgKiwgcnN2Z19oYW5kbGVfZ2V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biAxOwogCkBAIC0xMDI0OSw3ICsxMDI0MSw3IEBAIG5vbi1udW1lcmljLCB0aGVyZSBpcyBubyBl
eHBsaWNpdCBsaW1pdCBvbiB0aGUgc2l6ZSBvZiBpbWFnZXMuICAqLyk7CiAgIGFkZF9pbWFnZV90
eXBlIChRc3ZnKTsKICNpZmRlZiBIQVZFX05UR1VJCiAgIC8qIE90aGVyIGxpYnJhcmllcyB1c2Vk
IGRpcmVjdGx5IGJ5IHN2ZyBjb2RlLiAgKi8KLSAgREVGU1lNIChRZ2RrX3BpeGJ1ZiwgImdkay1w
aXhidWYiKTsKKyAgREVGU1lNIChRY2Fpcm8sICJjYWlybyIpOwogICBERUZTWU0gKFFnbGliLCAi
Z2xpYiIpOwogICBERUZTWU0gKFFnb2JqZWN0LCAiZ29iamVjdCIpOwogI2VuZGlmIC8qIEhBVkVf
TlRHVUkgICovCg==

--Multipart_Tue_Jun_25_08:06:23_2019-1--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36315; Package emacs. Full text available.

Message received at 36315 <at> debbugs.gnu.org:


Received: (at 36315) by debbugs.gnu.org; 24 Jun 2019 17:41:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 24 13:41:20 2019
Received: from localhost ([127.0.0.1]:57915 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hfSy0-0006eS-M9
	for submit <at> debbugs.gnu.org; Mon, 24 Jun 2019 13:41:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:43577)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1hfSxy-0006eB-2q
 for 36315 <at> debbugs.gnu.org; Mon, 24 Jun 2019 13:41:18 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:41088)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1hfSxn-0006WF-9F; Mon, 24 Jun 2019 13:41:09 -0400
Received: from [176.228.60.248] (port=3226 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1hfSxm-0005kC-0y; Mon, 24 Jun 2019 13:41:07 -0400
Date: Mon, 24 Jun 2019 20:41:03 +0300
Message-Id: <83blymnaog.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: YAMAMOTO Mitsuharu <mituharu@HIDDEN>
In-reply-to: <wl1rzjquv6.wl-mituharu@HIDDEN> (message from
 YAMAMOTO Mitsuharu on Mon, 24 Jun 2019 16:56:45 +0900)
Subject: Re: bug#36315: 27.0.50; SVG transparency handling is inaccurate
References: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
 <wl1rzjquv6.wl-mituharu@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 36315
Cc: 36315 <at> debbugs.gnu.org, pipcet@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: YAMAMOTO Mitsuharu <mituharu@HIDDEN>
> Cc: 36315 <at> debbugs.gnu.org
> 
> An alternative way would be to use rsvg_handle_render_cairo, which is
> recommended by librsvg, and let it blend with the background color.
> 
> Patch attached.  Note that this does not require --with-cairo.
> Raising the required version of librsvg to 2.14 is not a problem, as
> we are already using rsvg_handle_get_dimensions that requires that
> version.  Is Windows librsvg DLL compiled with libcairo?

librsvg on Windows is indeed build with libcairo, but if we don't get
the --with-cairo option, we don't probe for the necessary functions,
so at least theoretically we could have librsvg without Cairo.

The patch looks quite large.  Do we gain anything significant, apart
of the appraisal of librsvg developers?

I've built the patch on Windows (you forgot cairo_surface_destroy, so
I needed to add it), but the result is strange, or maybe I don't
understand what is expected.  I don't see any rectangle of color
#f00000, I see the entire frame with black background, and a few
characters in other colors.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36315; Package emacs. Full text available.

Message received at 36315 <at> debbugs.gnu.org:


Received: (at 36315) by debbugs.gnu.org; 24 Jun 2019 16:25:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 24 12:25:04 2019
Received: from localhost ([127.0.0.1]:57771 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hfRmB-0006cE-Fe
	for submit <at> debbugs.gnu.org; Mon, 24 Jun 2019 12:25:03 -0400
Received: from mail-ot1-f52.google.com ([209.85.210.52]:45801)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1hfRm9-0006bd-8S
 for 36315 <at> debbugs.gnu.org; Mon, 24 Jun 2019 12:25:02 -0400
Received: by mail-ot1-f52.google.com with SMTP id x21so14069788otq.12
 for <36315 <at> debbugs.gnu.org>; Mon, 24 Jun 2019 09:25:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=zX63Anu2jzGfHrRB1VNuE4Y8aJb3he9SXFBJFmS/YyQ=;
 b=SgE4vQxl5vR7o46gWOLA0wkz1X5pyqT17eAVJm8rykvlRQZyPE/wNCDHxrp9qCOq7g
 ZhjqN9hmZtrrl7Fs9SMTUYcNORuqb/fboWBGMlwjWxEve0+uDKIy3k6H/N/Bl1zzDpPM
 EUE7ImzcmRK1mGIgbQhum3drW2y1oyuvGMLGYyJkK3uJN60dEnT7Lu8/dlGJ8fuHvvNc
 ccsD3IV3/66AKHd1hYrdLFeqPQWEQh6iW6Yt1tlcIhdcvs6fNksksiWY9nWokgKS9Tc5
 SJI2hqaGPJtIq+vE1Obg00HjgXpcRRRfhV4hvEQJrd1QFViHIG49lEg5WMIRawbXPEFO
 609Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=zX63Anu2jzGfHrRB1VNuE4Y8aJb3he9SXFBJFmS/YyQ=;
 b=D6G4gPGMlALbd/FshzVFiNhdZOPRnNsf6zlopAhX7GDxDJRTor8EGjWo68ug5aN5tY
 KqvAf+DIzOE3KhWFSkSSV4rChJWAVi9fPXoaRvCpt+FVaHGHFixhsSkwsmcyKirTRcMK
 rnNRxjY+OuPBxaQ3N/SBdR57Dog2D6rqnhGquXkMqDpal9+zzvtVkkFlAubYbif8bsGv
 zObSB/FNNOaWz4vL2fCYBJVCZ8Zmce5PnAFaRG43PxJpGU4DOj4jT571JQhlyyyrObtK
 JFMHHcpebAW5r6V6+81FJXeJ7NK/UV7zve47UfTEL9ICTnSlRuFz1WIpWvMmTh8gpJ14
 9Xmw==
X-Gm-Message-State: APjAAAWscHESZiuRjaID7T4a8RXTW70M55E15RdXtWxDKkrj+ezL+DP4
 4ppLD2b40VMt8oNIZR1dOMdX/AiE0rIqZstHTE8=
X-Google-Smtp-Source: APXvYqzkyGYh2Z6W6DugbFfsil9BnoWx2OzTTrtXsaXS3LlRi7BVDWja5PMqHjedcdpmIqaK6od7cNjyLX6t7SYbz5k=
X-Received: by 2002:a9d:7284:: with SMTP id t4mr29528928otj.154.1561393495401; 
 Mon, 24 Jun 2019 09:24:55 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
 <wl1rzjquv6.wl-mituharu@HIDDEN>
 <wl1rzjjt1o.wl-mituharu@HIDDEN>
In-Reply-To: <wl1rzjjt1o.wl-mituharu@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Mon, 24 Jun 2019 16:24:17 +0000
Message-ID: <CAOqdjBcsA4ee-KAqpvVAD_mJ4DmVSxHC+9Q1xbqDepmPsFJ39g@HIDDEN>
Subject: Re: bug#36315: 27.0.50; SVG transparency handling is inaccurate
To: YAMAMOTO Mitsuharu <mituharu@HIDDEN>
Content-Type: multipart/mixed; boundary="000000000000a622dc058c144048"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36315
Cc: 36315 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000a622dc058c144048
Content-Type: text/plain; charset="UTF-8"

On Mon, Jun 24, 2019 at 8:17 AM YAMAMOTO Mitsuharu
<mituharu@HIDDEN> wrote:
> On Mon, 24 Jun 2019 16:56:45 +0900,
> YAMAMOTO Mitsuharu wrote:
> >
> > An alternative way would be to use rsvg_handle_render_cairo, which is
> > recommended by librsvg, and let it blend with the background color.
> >
> > Patch attached.  Note that this does not require --with-cairo.
> > Raising the required version of librsvg to 2.14 is not a problem, as
> > we are already using rsvg_handle_get_dimensions that requires that
> > version.  Is Windows librsvg DLL compiled with libcairo?
>
> Sorry, wrong patch.  Please try this instead.

Thank you very much, that fixes the problem. Unfortunately, I do not
know about the situation on Windows.

I'm not sure about the additional changes in the attached relative
patch, so feel free to take or leave them as you see fit. The second
call to cairo_set_source_rgb is currently unnecessary, because rsvg
forces the foreground color to black anyway, but that might change one
day (ideally, we'd use the frame foreground color, or even the current
face's foreground color; I have patches here that do this, though they
don't fix rsvg).

@@ -9619,15 +9619,19 @@ svg_load_image (struct frame *f, struct image
*img, char *contents,

   cairo_surface_t *surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
                              width, height);
+  if (cairo_surface_status (surface) != CAIRO_STATUS_SUCCESS)
+    goto rsvg_error;
   cairo_t *cr = cairo_create (surface);
   cairo_set_source_rgb (cr, background.red / 65535.0,
             background.green / 65535.0,
             background.blue / 65535.0);
   cairo_paint (cr);
+  cairo_set_source_rgb (cr, 0.0, 0.0, 0.0);
   rsvg_handle_render_cairo (rsvg_handle, cr);
   cairo_destroy (cr);
   g_object_unref (rsvg_handle);

+  cairo_surface_flush (surface);
   unsigned char *data = cairo_image_surface_get_data (surface);
   int stride = cairo_image_surface_get_stride (surface);
   for (int y = 0; y < height; ++y)
@@ -9636,9 +9640,9 @@ svg_load_image (struct frame *f, struct image
*img, char *contents,
       for (int x = 0; x < width; ++x)
     {
       guint32 rgb = *pixels++;
-      int red   = ((rgb >> 16) & 0xff) << 8;
-      int green = ((rgb >> 8) & 0xff) << 8;
-      int blue  = (rgb & 0xff) << 8;
+      int red   = ((rgb >> 16) & 0xff) * 0x101;
+      int green = ((rgb >> 8) & 0xff) * 0x101;
+      int blue  = (rgb & 0xff) * 0x101;
       PUT_PIXEL (ximg, x, y, lookup_rgb_color (f, red, green, blue));
     }
       data += stride;

--000000000000a622dc058c144048
Content-Type: text/x-patch; charset="US-ASCII"; name="0001-minor-things.patch"
Content-Disposition: attachment; filename="0001-minor-things.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_jxal90kz0>
X-Attachment-Id: f_jxal90kz0

RnJvbSA0MDJkYmQxZTFmZjVjMzNmZTkwNjFkZDM2MmQzYjQ3YTEwYWM1NjU4IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBNb24s
IDI0IEp1biAyMDE5IDE2OjIwOjE5ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gbWlub3IgdGhpbmdz
CgotLS0KIHNyYy9pbWFnZS5jIHwgMTAgKysrKysrKy0tLQogMSBmaWxlIGNoYW5nZWQsIDcgaW5z
ZXJ0aW9ucygrKSwgMyBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9zcmMvaW1hZ2UuYyBiL3Ny
Yy9pbWFnZS5jCmluZGV4IDkyNGExODhiNGEuLmNlNTUzNGIwN2EgMTAwNjQ0Ci0tLSBhL3NyYy9p
bWFnZS5jCisrKyBiL3NyYy9pbWFnZS5jCkBAIC05NjE5LDE1ICs5NjE5LDE5IEBAIHN2Z19sb2Fk
X2ltYWdlIChzdHJ1Y3QgZnJhbWUgKmYsIHN0cnVjdCBpbWFnZSAqaW1nLCBjaGFyICpjb250ZW50
cywKIAogICBjYWlyb19zdXJmYWNlX3QgKnN1cmZhY2UgPSBjYWlyb19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aW50IHggPSAwOyB4IDwgd2lkdGg7ICsreCkKIAl7CiAJICBn
dWludDMyIHJnYiA9ICpwaXhlbHMrKzsKLQkgIGludCByZWQgICA9ICgocmdiID4+IDE2KSAmIDB4
ZmYpIDw8IDg7Ci0JICBpbnQgZ3JlZW4gPSAoKHJnYiA+PiA4KSAmIDB4ZmYpIDw8IDg7Ci0JICBp
bnQgYmx1ZSAgPSAocmdiICYgMHhmZikgPDwgODsKKwkgIGludCByZWQgICA9ICgocmdiID4+IDE2
KSAmIDB4ZmYpICogMHgxMDE7CisJICBpbnQgZ3JlZW4gPSAoKHJnYiA+PiA4KSAmIDB4ZmYpICog
MHgxMDE7CisJICBpbnQgYmx1ZSAgPSAocmdiICYgMHhmZikgKiAweDEwMTsKIAkgIFBVVF9QSVhF
TCAoeGltZywgeCwgeSwgbG9va3VwX3JnYl9jb2xvciAoZiwgcmVkLCBncmVlbiwgYmx1ZSkpOwog
CX0KICAgICAgIGRhdGEgKz0gc3RyaWRlOwotLSAKMi4yMC4xCgo=
--000000000000a622dc058c144048--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36315; Package emacs. Full text available.

Message received at 36315 <at> debbugs.gnu.org:


Received: (at 36315) by debbugs.gnu.org; 24 Jun 2019 08:18:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 24 04:18:00 2019
Received: from localhost ([127.0.0.1]:55510 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hfKAq-0007ot-7f
	for submit <at> debbugs.gnu.org; Mon, 24 Jun 2019 04:18:00 -0400
Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:53815)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mituharu@HIDDEN>) id 1hfKAo-0007oh-5s
 for 36315 <at> debbugs.gnu.org; Mon, 24 Jun 2019 04:17:59 -0400
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 68056F08E7;
 Mon, 24 Jun 2019 17:17:55 +0900 (JST)
 (envelope-from mituharu@HIDDEN)
Date: Mon, 24 Jun 2019 17:17:55 +0900
Message-ID: <wl1rzjjt1o.wl-mituharu@HIDDEN>
From: YAMAMOTO Mitsuharu <mituharu@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
Subject: Re: bug#36315: 27.0.50; SVG transparency handling is inaccurate
In-Reply-To: <wl1rzjquv6.wl-mituharu@HIDDEN>
References: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
 <wl1rzjquv6.wl-mituharu@HIDDEN>
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)
Organization: Faculty of Science, Chiba University
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: multipart/mixed; boundary="Multipart_Mon_Jun_24_17:17:55_2019-1"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36315
Cc: 36315 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--Multipart_Mon_Jun_24_17:17:55_2019-1
Content-Type: text/plain; charset=US-ASCII

On Mon, 24 Jun 2019 16:56:45 +0900,
YAMAMOTO Mitsuharu wrote:
> 
> An alternative way would be to use rsvg_handle_render_cairo, which is
> recommended by librsvg, and let it blend with the background color.
> 
> Patch attached.  Note that this does not require --with-cairo.
> Raising the required version of librsvg to 2.14 is not a problem, as
> we are already using rsvg_handle_get_dimensions that requires that
> version.  Is Windows librsvg DLL compiled with libcairo?

Sorry, wrong patch.  Please try this instead.

				     YAMAMOTO Mitsuharu
				mituharu@HIDDEN

--Multipart_Mon_Jun_24_17:17:55_2019-1
Content-Type: application/octet-stream; type=patch; name="svg-cairo.diff"
Content-Disposition: attachment; filename="svg-cairo.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2NvbmZpZ3VyZS5hYyBiL2NvbmZpZ3VyZS5hYwppbmRleCAwNTA3ZjU4MDU0
YS4uNGZlOTcwMGIwM2UgMTAwNjQ0Ci0tLSBhL2NvbmZpZ3VyZS5hYworKysgYi9jb25maWd1cmUu
YWMKQEAgLTI2MDMsNyArMjYwMyw3IEBAIEFDX0RFRlVOCiBIQVZFX1JTVkc9bm8KIGlmIHRlc3Qg
IiR7SEFWRV9YMTF9IiA9ICJ5ZXMiIHx8IHRlc3QgIiR7SEFWRV9OU30iID0gInllcyIgfHwgdGVz
dCAiJHtvcHN5c30iID0gIm1pbmd3MzIiOyB0aGVuCiAgIGlmIHRlc3QgIiR7d2l0aF9yc3ZnfSIg
IT0gIm5vIjsgdGhlbgotICAgIFJTVkdfUkVRVUlSRUQ9Mi4xMS4wCisgICAgUlNWR19SRVFVSVJF
RD0yLjE0LjAKICAgICBSU1ZHX01PRFVMRT0ibGl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peF9Db250YWluZXIgeGltZzsKKyAgaWYgKCFpbWFnZV9jcmVhdGVfeF9pbWFn
ZV9hbmRfcGl4bWFwIChmLCBpbWcsIHdpZHRoLCBoZWlnaHQsIDAsICZ4aW1nLCAwKSkKKyAgICB7
CisgICAgICBnX29iamVjdF91bnJlZiAocnN2Z19oYW5kbGUpOworICAgICAgcmV0dXJuIDA7Cisg
ICAgfQogCi0gICAgaW5pdF9jb2xvcl90YWJsZSAoKTsKKyAgaW5pdF9jb2xvcl90YWJsZSAoKTsK
IAotICAgIC8qIEhhbmRsZSBhbHBoYSBjaGFubmVsIGJ5IGNvbWJpbmluZyB0aGUgaW1hZ2Ugd2l0
aCBhIGJhY2tncm91bmQKLSAgICAgICBjb2xvci4gICovCi0gICAgRW1hY3NfQ29sb3IgYmFja2dy
b3VuZDsKLSAgICBMaXNwX09iamVjdCBzcGVjaWZpZWRfYmcgPSBpbWFnZV9zcGVjX3ZhbHVlIChp
bWctPnNwZWMsIFFDYmFja2dyb3VuZCwgTlVMTCk7Ci0gICAgaWYgKCFTVFJJTkdQIChzcGVjaWZp
ZWRfYmcpCi0JfHwgIUZSQU1FX1RFUk1JTkFMIChmKS0+ZGVmaW5lZF9jb2xvcl9ob29rIChmLAot
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNTREFU
QSAoc3BlY2lmaWVkX2JnKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAmYmFja2dyb3VuZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBmYWxzZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICBmYWxzZSkpCi0gICAgICBGUkFNRV9URVJNSU5BTCAo
ZiktPnF1ZXJ5X2ZyYW1lX2JhY2tncm91bmRfY29sb3IgKGYsICZiYWNrZ3JvdW5kKTsK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NLR1JPVU5EIChpbWcsIGYsIChFbWFjc19QaXhfQ29udGV4dCl4
aW1nKTsKIAotICAgIC8qIFB1dCB4aW1nIGludG8gdGhlIGltYWdlLiAgKi8KLSAgICBpbWFnZV9w
dXRfeF9pbWFnZSAoZiwgaW1nLCB4aW1nLCAwKTsKLSAgfQorICAvKiBQdXQgeGltZyBpbnRvIHRo
ZSBpbWFnZS4gICovCisgIGltYWdlX3B1dF94X2ltYWdlIChmLCBpbWcsIHhpbWcsIDApOwogCiAg
IHJldHVybiAxOwogCkBAIC0xMDI0OSw3ICsxMDIxNiw3IEBAIG5vbi1udW1lcmljLCB0aGVyZSBp
cyBubyBleHBsaWNpdCBsaW1pdCBvbiB0aGUgc2l6ZSBvZiBpbWFnZXMuICAqLyk7CiAgIGFkZF9p
bWFnZV90eXBlIChRc3ZnKTsKICNpZmRlZiBIQVZFX05UR1VJCiAgIC8qIE90aGVyIGxpYnJhcmll
cyB1c2VkIGRpcmVjdGx5IGJ5IHN2ZyBjb2RlLiAgKi8KLSAgREVGU1lNIChRZ2RrX3BpeGJ1Ziwg
Imdkay1waXhidWYiKTsKKyAgREVGU1lNIChRY2Fpcm8sICJjYWlybyIpOwogICBERUZTWU0gKFFn
bGliLCAiZ2xpYiIpOwogICBERUZTWU0gKFFnb2JqZWN0LCAiZ29iamVjdCIpOwogI2VuZGlmIC8q
IEhBVkVfTlRHVUkgICovCg==

--Multipart_Mon_Jun_24_17:17:55_2019-1--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36315; Package emacs. Full text available.

Message received at 36315 <at> debbugs.gnu.org:


Received: (at 36315) by debbugs.gnu.org; 24 Jun 2019 07:56:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 24 03:56:50 2019
Received: from localhost ([127.0.0.1]:55498 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hfJqM-0007Hs-2n
	for submit <at> debbugs.gnu.org; Mon, 24 Jun 2019 03:56:50 -0400
Received: from mathmail.math.s.chiba-u.ac.jp ([133.82.132.2]:53839)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mituharu@HIDDEN>) id 1hfJqH-0007Hh-NV
 for 36315 <at> debbugs.gnu.org; Mon, 24 Jun 2019 03:56:48 -0400
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 D6610F08E7;
 Mon, 24 Jun 2019 16:56:45 +0900 (JST)
 (envelope-from mituharu@HIDDEN)
Date: Mon, 24 Jun 2019 16:56:45 +0900
Message-ID: <wl1rzjquv6.wl-mituharu@HIDDEN>
From: YAMAMOTO Mitsuharu <mituharu@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
Subject: Re: bug#36315: 27.0.50; SVG transparency handling is inaccurate
In-Reply-To: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
References: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
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)
Organization: Faculty of Science, Chiba University
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: multipart/mixed; boundary="Multipart_Mon_Jun_24_16:56:45_2019-1"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36315
Cc: 36315 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--Multipart_Mon_Jun_24_16:56:45_2019-1
Content-Type: text/plain; charset=US-ASCII

On Fri, 21 Jun 2019 05:26:53 +0900,
Pip Cet wrote:
> 
> [1  <text/plain; UTF-8 (7bit)>]
> Evaluate the following in emacs -Q:
> 
> (require 'svg)
> 
> (defun make-image (color)
>   (let ((svg (svg-create 100 100)))
>     (svg-rectangle svg 0 0 100 100 :fill color)
>     (svg-image svg)))
> 
> (set-frame-parameter (window-frame) 'background-color "black")
> 
> (insert (propertize " " 'display (make-image "#f00000")))
> 
> The expected result is a rectangle (on black background) of color
> #f00000. The actual result is a rectangle of color #ef0000. For black
> backgrounds, white is no longer representable.
> 
> This is related to bug #36304, but much easier to fix.
> 
> Patch attached.

An alternative way would be to use rsvg_handle_render_cairo, which is
recommended by librsvg, and let it blend with the background color.

Patch attached.  Note that this does not require --with-cairo.
Raising the required version of librsvg to 2.14 is not a problem, as
we are already using rsvg_handle_get_dimensions that requires that
version.  Is Windows librsvg DLL compiled with libcairo?

				     YAMAMOTO Mitsuharu
				mituharu@HIDDEN

--Multipart_Mon_Jun_24_16:56:45_2019-1
Content-Type: application/octet-stream; type=patch; name="svg-cairo.diff"
Content-Disposition: attachment; filename="svg-cairo.diff"
Content-Transfer-Encoding: base64

ZGlmZiAtLWdpdCBhL2NvbmZpZ3VyZS5hYyBiL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ImNhaXJvIik7CiAgIERFRlNZTSAoUWdsaWIsICJnbGliIik7CiAgIERF
RlNZTSAoUWdvYmplY3QsICJnb2JqZWN0Iik7CiAjZW5kaWYgLyogSEFWRV9OVEdVSSAgKi8K

--Multipart_Mon_Jun_24_16:56:45_2019-1--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36315; Package emacs. Full text available.

Message received at 36315 <at> debbugs.gnu.org:


Received: (at 36315) by debbugs.gnu.org; 22 Jun 2019 20:56:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 22 16:56:53 2019
Received: from localhost ([127.0.0.1]:52586 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hen48-0004qc-Q3
	for submit <at> debbugs.gnu.org; Sat, 22 Jun 2019 16:56:53 -0400
Received: from mail-wr1-f50.google.com ([209.85.221.50]:34022)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <athird@HIDDEN>) id 1hen46-0004qM-7D
 for 36315 <at> debbugs.gnu.org; Sat, 22 Jun 2019 16:56:50 -0400
Received: by mail-wr1-f50.google.com with SMTP id k11so9853495wrl.1
 for <36315 <at> debbugs.gnu.org>; Sat, 22 Jun 2019 13:56:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=googlemail.com; s=20161025;
 h=sender:date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:in-reply-to:user-agent;
 bh=V468Td83SPP/0ogfVlN+MM4S5Z5gGWBTTUhq3ETf0wY=;
 b=cU7Kbh6mK0ybnK68E8m9uSLQTE9b1moTPp/WpY84r8BYj6wDip9vkRgseFEUlteSh9
 k6bssniHx1xAVVQCM7FvTCmHrftJvO9zY7grKmVpz9FbAU3/iDtrwCJi75LUDa89cd14
 uA9DGMjsN04zqpmE+fLnUSmBr7SP4up8OkclR5gHARyeWYNiEfoMExy7hCGlrSTafWax
 aIWhcOCrFI0qwbc6KNQLu5/SLt+uRT/44IpD2hq+eCbmVsrxbOF4MvcHs/9QeV8fYrs4
 6bOBZtDTs6VbsXcgfv16X0EDW0i95Fii/VijeDiK4QshgQb6/s7KRBQyylRRpAHlk9lZ
 P4hQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:date:from:to:cc:subject:message-id
 :references:mime-version:content-disposition:in-reply-to:user-agent;
 bh=V468Td83SPP/0ogfVlN+MM4S5Z5gGWBTTUhq3ETf0wY=;
 b=jCC6T4egA7DsZogMQO8yYh/xBxo005DuHOrr6DbpDGwM5zIitgM1iZwMwD6NVyfxea
 ND/JpYI8O/F68HIgOWlL7oABYHqQE3QUPA0m3aTpKwx9RLKpCuXmLb9+xejmOrS7P+U7
 pibftojlok1qlj71vdYO0FCTNS+qSM5LArPmL3ISIOSIG6nyHG347PO9vl+RErOP6bTo
 DA2wrQ57i92WXfe+6uAj6c7OL7ag4IpjHuiIQ1j0/88mO2GdVB/07256HJnfm2hPjl/D
 rjm9xYF6Jq0wHAe5XKytyvxaSSLWvJS+xnY2rm87Av4L3kSXRpyhWiIrjUysGRvA0nkh
 V6Ow==
X-Gm-Message-State: APjAAAXi+alCqkuvOWf/k7zvJiqWdOOw/LrNd8Q2u8Ldqkdrnl3Sunos
 rc2Lm92autCz6syhks8wdmI=
X-Google-Smtp-Source: APXvYqzmQn6MVOJJVvxEVO8j3fzj/pP4CVXDHZtk4GTg5s/8KrtQaJGg3mIsqlRcRRUBI5IBmWraZQ==
X-Received: by 2002:adf:b60f:: with SMTP id f15mr37144804wre.283.1561237004090; 
 Sat, 22 Jun 2019 13:56:44 -0700 (PDT)
Received: from breton.holly.idiocy.org
 (ip6-2001-08b0-03f8-8129-687e-3b34-1271-b994.holly.idiocy.org.
 [2001:8b0:3f8:8129:687e:3b34:1271:b994])
 by smtp.gmail.com with ESMTPSA id x20sm8287868wrg.52.2019.06.22.13.56.43
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 22 Jun 2019 13:56:43 -0700 (PDT)
Date: Sat, 22 Jun 2019 21:56:41 +0100
From: Alan Third <alan@HIDDEN>
To: Pip Cet <pipcet@HIDDEN>
Subject: Re: bug#36315: 27.0.50; SVG transparency handling is inaccurate
Message-ID: <20190622205641.GG57900@HIDDEN>
References: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
 <CAOqdjBdT2hndsSq1-E0j32wCBU1047+jc5derx+XMiicj7CSew@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAOqdjBdT2hndsSq1-E0j32wCBU1047+jc5derx+XMiicj7CSew@HIDDEN>
User-Agent: Mutt/1.12.0 (2019-05-25)
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 36315
Cc: 36315 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On Thu, Jun 20, 2019 at 08:46:20PM +0000, Pip Cet wrote:
> Oops, typo in the patch. Better patch attached.

I know nothing about librsvg, but the patch does appear to fix the
described behaviour (although I had to try #FFFFFF because #F00000,
appeared to come out as something else entirely in both cases).
-- 
Alan Third




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36315; Package emacs. Full text available.

Message received at 36315 <at> debbugs.gnu.org:


Received: (at 36315) by debbugs.gnu.org; 20 Jun 2019 20:47:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 20 16:47:05 2019
Received: from localhost ([127.0.0.1]:49342 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1he3xZ-0007jt-G3
	for submit <at> debbugs.gnu.org; Thu, 20 Jun 2019 16:47:05 -0400
Received: from mail-oi1-f194.google.com ([209.85.167.194]:46359)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1he3xW-0007jM-Ks
 for 36315 <at> debbugs.gnu.org; Thu, 20 Jun 2019 16:47:03 -0400
Received: by mail-oi1-f194.google.com with SMTP id 65so3117032oid.13
 for <36315 <at> debbugs.gnu.org>; Thu, 20 Jun 2019 13:47:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to;
 bh=RhsQGfXJPLg7eLX7PIR+Y4G0Atw22+17mbqvuffS0+w=;
 b=u5Wivot04GH7d7TDRnt3b/ROmtg2kHQ+qhjmJsvOVvMs+Rxt5wTlwjBCP2UbKkbklH
 Sl6Q2oy3IhIcEwTrRQlgHKtkUU8PGvePTTNyrW2k4roKZu3WgI1WMQLuer47I+mac5Tp
 j9Pi6av3VMWLto62aXWYqGDHM6dXxZqMO4L0EXyUy3NY2WMMU7VKHQo7iJaGRP7kFPWr
 pJPum514rGSDT2hyWLgnkbQpd7egfJj9GkzI74Yklu0niqKSKiTIUq8phAlhRDnpFJ7l
 evCXPO8T4ap6lBJduHL6DduHm7M4v8rZQFQ2yNzoaRpcZ6VC5Kiel6b2uxUCOYn95sGS
 /Yfw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to;
 bh=RhsQGfXJPLg7eLX7PIR+Y4G0Atw22+17mbqvuffS0+w=;
 b=LTu+5nal7UKuAuQY7syB4L0u3pAlQLf8ETeF7cbOqBG3Wn6Hsq/qN1wMyNbC23buST
 wyVcKZqUZMsNWRMYV4ONqE5UMrkInHwkZfyi6sLRC2moLN37KkiNPMp6wSXreG5QrPrV
 7n92DXN6CjItQRa2Fu6oa3jbsqUIdaH7gUAeoRnNquy5g3Pe+crNDN6PwHtD9MXqMyt0
 8n+R45F2Qv8xR/7gev+uvLsLUIvy9TDCIFWxyddNPH7t1CnZ6KnAWMjqmye8WrxGXuKH
 fk2EebB+qkvByyKptmKNWUBI/A6pc6pszMK3ujj/+2XfknBo1A2NM/HmbhPM7CN6UzyK
 BG+w==
X-Gm-Message-State: APjAAAX8Ho8SlskNbgNvu/8UEL8eZ4+sTELRQ+QFw1LNjV9xR7wtFKTE
 mbVXv1r4HJlRgazYxkf0CGwJyvZs6czVlHyt7yM83a4UMNU=
X-Google-Smtp-Source: APXvYqyPoPCqOtswg3cF9c4MUkg5CXcOOYVo/NhdnXLroRG1mUPIo2vpKBtrv3IEYzkspsyIZbrJIUjKT+lv0zs58Xw=
X-Received: by 2002:aca:4790:: with SMTP id u138mr614542oia.44.1561063616608; 
 Thu, 20 Jun 2019 13:46:56 -0700 (PDT)
MIME-Version: 1.0
References: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
In-Reply-To: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
From: Pip Cet <pipcet@HIDDEN>
Date: Thu, 20 Jun 2019 20:46:20 +0000
Message-ID: <CAOqdjBdT2hndsSq1-E0j32wCBU1047+jc5derx+XMiicj7CSew@HIDDEN>
Subject: Re: bug#36315: 27.0.50; SVG transparency handling is inaccurate
To: 36315 <at> debbugs.gnu.org
Content-Type: multipart/mixed; boundary="000000000000571a05058bc77246"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 36315
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000571a05058bc77246
Content-Type: text/plain; charset="UTF-8"

Oops, typo in the patch. Better patch attached.

Subject: [PATCH] SVG: scale color values properly

* src/image.c (svg_load_image): scale color channel values to proper
range.
---
 src/image.c | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

diff --git a/src/image.c b/src/image.c
index 866323ba6e..8e25f1f590 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9658,17 +9658,20 @@ svg_load_image (struct frame *f, struct image
*img, char *contents,
       {
     for (int x = 0; x < width; ++x)
       {
-        int red     = *pixels++;
-        int green   = *pixels++;
-        int blue    = *pixels++;
-        int opacity = *pixels++;
-
-        red   = ((red * opacity)
-             + (background.red * ((1 << 8) - opacity)));
-        green = ((green * opacity)
-             + (background.green * ((1 << 8) - opacity)));
-        blue  = ((blue * opacity)
-             + (background.blue * ((1 << 8) - opacity)));
+        unsigned int red     = *pixels++;
+        unsigned int green   = *pixels++;
+        unsigned int blue    = *pixels++;
+        unsigned int opacity = *pixels++;
+
+        /* opacity and the color channel values are in the range {0..255},
+         * but expected output values are in the range {0..65535}, so scale
+         * by (256/255)^2. */
+#define MIX(a, b, opacity)                        \
+        (((((a) * opacity) + ((b) * (255 - opacity))) * 65535 + 32512) / 65025)
+        red   = MIX (red, background.red, opacity);
+        green = MIX (green, background.green, opacity);
+        blue  = MIX (blue, background.blue, opacity);
+#undef MIX

         PUT_PIXEL (ximg, x, y, lookup_rgb_color (f, red, green, blue));
       }
-- 
2.20.1


On Thu, Jun 20, 2019 at 8:43 PM Pip Cet <pipcet@HIDDEN> wrote:
>
> Evaluate the following in emacs -Q:
>
> (require 'svg)
>
> (defun make-image (color)
>   (let ((svg (svg-create 100 100)))
>     (svg-rectangle svg 0 0 100 100 :fill color)
>     (svg-image svg)))
>
> (set-frame-parameter (window-frame) 'background-color "black")
>
> (insert (propertize " " 'display (make-image "#f00000")))
>
> The expected result is a rectangle (on black background) of color
> #f00000. The actual result is a rectangle of color #ef0000. For black
> backgrounds, white is no longer representable.
>
> This is related to bug #36304, but much easier to fix.
>
> Patch attached.

--000000000000571a05058bc77246
Content-Type: application/x-patch; 
	name="0001-SVG-scale-color-values-properly.patch"
Content-Disposition: attachment; 
	filename="0001-SVG-scale-color-values-properly.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_jx54vp5n0>
X-Attachment-Id: f_jx54vp5n0

RnJvbSAyZTVhZGUyYjJmNjliNzYwYzc1NGNlMTRjMGFiZDU1YmVkMTc5NjE0IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBUaHUs
IDIwIEp1biAyMDE5IDIwO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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#36315; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 20 Jun 2019 20:27:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 20 16:27:52 2019
Received: from localhost ([127.0.0.1]:49331 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1he3ey-0007GV-4K
	for submit <at> debbugs.gnu.org; Thu, 20 Jun 2019 16:27:52 -0400
Received: from lists.gnu.org ([209.51.188.17]:38285)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pipcet@HIDDEN>) id 1he3ev-0007GN-Ht
 for submit <at> debbugs.gnu.org; Thu, 20 Jun 2019 16:27:50 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37729)
 by lists.gnu.org with esmtp (Exim 4.86_2)
 (envelope-from <pipcet@HIDDEN>) id 1he3ep-0006mP-AF
 for bug-gnu-emacs@HIDDEN; Thu, 20 Jun 2019 16:27:49 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <pipcet@HIDDEN>) id 1he3ec-000718-Uz
 for bug-gnu-emacs@HIDDEN; Thu, 20 Jun 2019 16:27:33 -0400
Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]:46603)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <pipcet@HIDDEN>) id 1he3ec-0006xv-L2
 for bug-gnu-emacs@HIDDEN; Thu, 20 Jun 2019 16:27:30 -0400
Received: by mail-ot1-x336.google.com with SMTP id z23so4007666ote.13
 for <bug-gnu-emacs@HIDDEN>; Thu, 20 Jun 2019 13:27:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=yZ5ZSt3JRD7BgrGiyLByN6y95MhOgXQPjTq+87Qk4Qo=;
 b=tkVgkL7Poe/i2tOphnz477wODCbZpAP+58yDyNXtsJqleGE8rsS5XY5YWLBn63ZLL/
 GOAymhZJhbD14v8zW6JZvp1sdqMM4XHknY5jhTdPlyRl0tTqRy7mj5SaXJfYAwVMKj3J
 Ws7X4nuWrUdjQwOXh9mf68IYfO5QNv2yYSlnmxkF41KqGqv7lW5xUNLDz3kg67lLmLtd
 zNjyINZuyqSd4+WvrgyIWYq1hgufavCc4XLTl/386uT23onME07Dtlb65SNsjcn9p8CF
 ZtrjB6cdbh/4K5U60OJywjaDLkQFJbGsRF5AKrc+CxjILFJ5AaV1Sdt8m+nD8D8NDffS
 gQ1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=yZ5ZSt3JRD7BgrGiyLByN6y95MhOgXQPjTq+87Qk4Qo=;
 b=liSf9ZxpT2dMsX+hroZlbk15I1jJZ30wry9Ft0V7Lmj6yDDazcUkB2pT4SO44DYtDL
 cUxJFVDwWiaFyA/gX65knZBZBimDJNnelcmae7G5VpSjy/8Wi6FQCJYSbMTlqCmd4iAF
 SkdWMXmRis5GhZNHsTNadZGrJFYAsWcTAhm/8EPPsad4Gk10qaLSgOJ3EVQ+iJ2pso4D
 Nf+Xwiu6RgyIjzaQuj6IRG26Hg1+Z0M6PPi5qwrkTAMoTCZHUaQnI4FyXM8ZuWHtCiCc
 MA4yX++ng9u2KfYg7ZTrnuQbe9XUIxUeIbCiLg2sdtfs7A5BcBlNxHfSLs2OL3uDen4F
 Mfhg==
X-Gm-Message-State: APjAAAW4Xff+Q52fMpNgdh+U/CslswhgLMExVDa/jfxsbwESRBMWHzhV
 wG6xS+2mdsVzdUzNdfmU34O+NFsOisedUH/+oFOb65cK/0A=
X-Google-Smtp-Source: APXvYqwQK7SzRElr/+idAZ9m4dzul6WU+veyTXV6sln2AsdtYnAsVWIEYbtrDFg33pyzuRQTV261A4jNW4i4m9Sz+zk=
X-Received: by 2002:a9d:7352:: with SMTP id l18mr2406921otk.292.1561062449164; 
 Thu, 20 Jun 2019 13:27:29 -0700 (PDT)
MIME-Version: 1.0
From: Pip Cet <pipcet@HIDDEN>
Date: Thu, 20 Jun 2019 20:26:53 +0000
Message-ID: <CAOqdjBcuLiay8U9Q5DfP-b7z8HRNV3HoGdhrUj9enVwYp52T1w@HIDDEN>
Subject: 27.0.50; SVG transparency handling is inaccurate
To: bug-gnu-emacs@HIDDEN
Content-Type: multipart/mixed; boundary="000000000000c1578b058bc72c3a"
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2607:f8b0:4864:20::336
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--000000000000c1578b058bc72c3a
Content-Type: text/plain; charset="UTF-8"

Evaluate the following in emacs -Q:

(require 'svg)

(defun make-image (color)
  (let ((svg (svg-create 100 100)))
    (svg-rectangle svg 0 0 100 100 :fill color)
    (svg-image svg)))

(set-frame-parameter (window-frame) 'background-color "black")

(insert (propertize " " 'display (make-image "#f00000")))

The expected result is a rectangle (on black background) of color
#f00000. The actual result is a rectangle of color #ef0000. For black
backgrounds, white is no longer representable.

This is related to bug #36304, but much easier to fix.

Patch attached.

--000000000000c1578b058bc72c3a
Content-Type: text/x-patch; charset="US-ASCII"; 
	name="0001-SVG-scale-color-values-properly.patch"
Content-Disposition: attachment; 
	filename="0001-SVG-scale-color-values-properly.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_jx546w9q0>
X-Attachment-Id: f_jx546w9q0

RnJvbSA3YWJlNjQwNGQzYWYwNGRiMmY1YTUwM2MxYzg3M2Y4MGFiODZmNjllIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBUaHUs
IDIwIEp1biAyMDE5IDIwOjEzOjEyICswMDAwClN1YmplY3Q6IFtQQVRDSF0gU1ZHOiBzY2FsZSBj
b2xvciB2YWx1ZXMgcHJvcGVybHkKCiogc3JjL2ltYWdlLmMgKHN2Z19sb2FkX2ltYWdlKTogc2Nh
bGUgY29sb3IgY2hhbm5lbCB2YWx1ZXMgdG8gcHJvcGVyCnJhbmdlLgotLS0KIHNyYy9pbWFnZS5j
IHwgMjUgKysrKysrKysrKysrKystLS0tLS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDE0IGluc2Vy
dGlvbnMoKyksIDExIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdpdCBhL3NyYy9pbWFnZS5jIGIvc3Jj
L2ltYWdlLmMKaW5kZXggODY2MzIzYmE2ZS4uNmI2MjM1YTYxNyAxMDA2NDQKLS0tIGEvc3JjL2lt
YW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CBvdXRwdXQgdmFsdWVzIGFyZSBpbiB0aGUgcmFuZ2UgezAuLjY1NTM1fSwgc28gc2NhbGUK
KwkgICAgICogYnkgKDI1Ni8yNTUpXjIuICovCisjZGVmaW5lIE1JWChhLCBiLCBvcGFjaXR5KQkJ
CQkJCVwKKwkgICAgKCgoKChhKSAqIG9wYWNpdHkpICsgKChiKSAqICgyNTUgLSBvcGFjaXR5KSkp
ICogNjU1MzUgKyAzMjUxMikgLyA2NTAyNSkKKwkgICAgcmVkICAgPSBNSVggKHJlZCwgYmFja2dy
b3VuZC5yZWQsIG9wYWNpdHkpOworCSAgICBncmVlbiA9IE1JWCAoZ3JlZW4sIGJhY2tncm91bmQu
cmVkLCBvcGFjaXR5KTsKKwkgICAgYmx1ZSAgPSBNSVggKGJsdWUsIGJhY2tncm91bmQucmVkLCBv
cGFjaXR5KTsKKyN1bmRlZiBNSVgKIAogCSAgICBQVVRfUElYRUwgKHhpbWcsIHgsIHksIGxvb2t1
cF9yZ2JfY29sb3IgKGYsIHJlZCwgZ3JlZW4sIGJsdWUpKTsKIAkgIH0KLS0gCjIuMjAuMQoK
--000000000000c1578b058bc72c3a--




Acknowledgement sent to Pip Cet <pipcet@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#36315; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 24 Jun 2019 23:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.