Bug 386329 - Some SVGs are black
Summary: Some SVGs are black
Status: RESOLVED UPSTREAM
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 17.08.2
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-29 16:37 UTC by Sefa Eyeoglu
Modified: 2017-10-31 18:41 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
My profile picture SVG (837 bytes, image/svg+xml)
2017-10-29 16:37 UTC, Sefa Eyeoglu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sefa Eyeoglu 2017-10-29 16:37:17 UTC
Created attachment 108632 [details]
My profile picture SVG

The SVG attached below is just black viewing in Gwenview.
If opened with Chromium it works fine.
Comment 1 null 2017-10-31 18:08:10 UTC
Hi Sefa, thanks for reporting and your enthusiasm for KDE's software. I can confirm your observation. Unfortunately, "svgviewer" from the examples contained in Qt's SVG module shows the same behaviour. As we just use Qt for rendering SVGs, this means we cannot do anything for you from Gwenview's side (except someone would provide a patch to change our SVG renderer to something better).

Digging a bit deeper, the issue boils down to how the opacity is specified in the SVG. In http://doc.qt.io/qt-5/svgrendering.html it is mentioned that only SVG Tiny 1.2 is supported by Qt, which your SVG is not. However, there is a trick to get SVGs not conforming to this spec to work: You can add type="text/css" to the style element of your SVG, then Gwenview is able to render it fine for me.

This problem has already been reported in https://bugreports.qt.io/browse/QTBUG-58326, which is still unresolved. I added a comment over there, but to get things going an actual patch against the Qt SVG module would be needed.
Comment 2 Sefa Eyeoglu 2017-10-31 18:40:42 UTC
Okay. Nice to know. :D Wish you a nice evening