GNU bug report logs -
#36315
27.0.50; SVG transparency handling is inaccurate
Previous Next
Reported by: Pip Cet <pipcet <at> gmail.com>
Date: Thu, 20 Jun 2019 20:28:02 UTC
Severity: normal
Found in version 27.0.50
Done: Alan Third <alan <at> idiocy.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 18 Dec 2020 18:04:45 +0000
with message-id <X9zvPV5PFsb7DM74 <at> breton.holly.idiocy.org>
and subject line Re: bug#36315: Incorrect SVG color
has caused the debbugs.gnu.org bug report #36315,
regarding 27.0.50; SVG transparency handling is inaccurate
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
36315: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=36315
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
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.
[0001-SVG-scale-color-values-properly.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
On Fri, Dec 18, 2020 at 04:42:03PM +0000, Qiantan Hong wrote:
> I fixed my build and it behaves correctly on macOS
> now.
>
> M-x emacs-version
> GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G6032)) of 2020-12-18
Excellent! Thanks for letting us know.
> To make sure I understand it, did we start outsourcing color some point after 27.1?
We pass the foreground and background colours into librsvg, which
creates the bitmap image that's displayed, in a commit that's just a
few months old. It will appear in Emacs 28.
I don't expect the change to be included in Emacs 27 since it's a
fairly large change introducing a number of new features and any new
Emacs 27 releases will be primarily bug fixes.
--
Alan Third
This bug report was last modified 3 years and 219 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.