Bug 34205 - SVG import: transparency gradients incorrect
Summary: SVG import: transparency gradients incorrect
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-12 01:58 UTC by Roland Baudin
Modified: 2011-08-19 10:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
SVG example from the LibreOffice release notes (51.62 KB, image/svg+xml)
2011-02-12 01:58 UTC, Roland Baudin
Details
How the car is rendered in LibreOffice 3.3.0 (204.24 KB, image/png)
2011-02-12 01:59 UTC, Roland Baudin
Details
A simple equation (obtained from Latex, no fonts, just curves) (7.73 KB, image/svg+xml)
2011-02-12 02:00 UTC, Roland Baudin
Details
The rendered equation (65.14 KB, image/png)
2011-02-12 02:01 UTC, Roland Baudin
Details
car.svg imported in LibreOffice Draw (24.01 KB, application/vnd.oasis.opendocument.graphics)
2011-02-13 00:48 UTC, Roland Baudin
Details
equation.svg imported in LibreOffice Draw (9.27 KB, application/vnd.oasis.opendocument.graphics)
2011-02-13 00:49 UTC, Roland Baudin
Details
Compares results due to Comment 10 (23.15 KB, application/vnd.oasis.opendocument.graphics)
2011-02-13 01:45 UTC, Rainer Bielefeld Retired
Details
A screenshot of the rendered car on Windows (same hardware as in Linux) (480.83 KB, image/png)
2011-02-13 10:22 UTC, Roland Baudin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Baudin 2011-02-12 01:58:33 UTC
Created attachment 43286 [details]
SVG example from the LibreOffice release notes

Hi,

I tried the SVG import feature of Draw and it does not work correctly.
Even the example shown in the LibreOffice 3.3.0 release notes (file Chrisdesign_Future_car.svg) is not displayed correctly.

I attach two examples : the SVG file and a screenshot that shows how it is rendered. The second SVG file is a Latex equation.

Both files are correctly rendered using the SVG import 1.2.2 extension. However, it seems that this extension is not used by the Insert / Picture / Image menu in LibreOffice.
Comment 1 Roland Baudin 2011-02-12 01:59:42 UTC
Created attachment 43287 [details]
How the car is rendered in LibreOffice 3.3.0
Comment 2 Roland Baudin 2011-02-12 02:00:35 UTC
Created attachment 43288 [details]
A simple equation (obtained from Latex, no fonts, just curves)
Comment 3 Roland Baudin 2011-02-12 02:01:06 UTC
Created attachment 43289 [details]
The rendered equation
Comment 4 Rainer Bielefeld Retired 2011-02-12 08:12:38 UTC
SVG import result with "LibreOffice 3.3.1 RC1 - WIN7  Home Premium (64bit) German UI  [OOO330m19 (build 7 / tag 3.3.1.1)]" is far away from being perfect, but I can't reproduce reporter's ugly result.

@Roland Baudin:
Please contribute detailed information concerning your OS and please attach your import.odg!
Comment 5 tester8 2011-02-12 11:04:23 UTC
Fully reproduced with LO 3.3 RC4 Ubuntu 10.04 x86.
Comment 6 Kurosawa Takeshi 2011-02-12 19:47:18 UTC
(In reply to comment #3)
> Created an attachment (id=43289) [details]
> The rendered equation

This problem is same as bug 33900; LibreOffice doesn't support use element.
The problem for the car may have another cause. Because it doesn't contain use element.
Comment 7 Roland Baudin 2011-02-13 00:48:02 UTC
Created attachment 43311 [details]
car.svg imported in LibreOffice Draw
Comment 8 Roland Baudin 2011-02-13 00:49:09 UTC
Created attachment 43312 [details]
equation.svg imported in LibreOffice Draw
Comment 9 Roland Baudin 2011-02-13 00:50:23 UTC
Thanks for your comments.
My OS is Debian Linux Squeeze (6.0). The LibreOffice version is LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4
I have the same results on Windows XP SP3 with the same LibreOffice version.
I attach the two odg files.
Best regards,
RB
Comment 10 Rainer Bielefeld Retired 2011-02-13 01:44:18 UTC
We can't handle "make SVG import better" reports, so here we have to concentrate on one particular effect, I selected transparency problems.

In my document "carcompare.odg" I found out, that in reporters import

In the best case transparency gradients become constant transparency, you can see that in the diverse elements of the cockpit cover

In the worst case transparency will become "no transparency", please see wheel caps.

Because this detail currently is not confirmed for WIN, I limited OS to Linux.
Due to Comment 5 I delete UNCONFIRMED from Whiteboard.

@Roland Baudin:
Can you please file separate reports for each not working detail? Especially for the formula problem, if you think that bug 33900 does not completely cover your problem.
Please contribute more precise details concerning your comment "I have the same results .... "
- Same PC?
- What concerning the restricted focus to transparency gradient?

@tester8, KUROSAWA, Takeshi:
Can you confirm my details?
Comment 11 Rainer Bielefeld Retired 2011-02-13 01:45:33 UTC
Created attachment 43313 [details]
Compares results due to Comment 10
Comment 12 Roland Baudin 2011-02-13 10:21:02 UTC
I can confirm that in your document carcompare.odg there is a transparency problem in the first page (this is how the car is rendered when I open the svg file on Windows or Linux), and that the transparency problem is not there in the second page.

Here are some details about my systems and hardware :

PC with double boot Windows / Linux
Motherboard Gigabyte EP45-DS3R
CPU Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz
Memory 4GB
Graphics board :Mobility Radeon HD 3600 Series [1002:9598]

Debian Linux 6.0 (Squeeze)
Windows XP SP3 (see screenshot for details)

Hope this helps. Please tell me if you want other details.
(And sorry for having reported two problems at the same time. I didn't thought that the problem was different in the two files. I'm not a svg expert at all.)
Comment 13 Roland Baudin 2011-02-13 10:22:36 UTC
Created attachment 43321 [details]
A screenshot of the rendered car on Windows (same hardware as in Linux)
Comment 14 Kurosawa Takeshi 2011-02-13 20:27:58 UTC
Actually gradients in car.svg are ignored. The car.svg uses syntax like

fill: url("#radialGradient4167")

However LibreOffice doesn't support it. Although it supports syntax like "fill: url(#radialGradient4167)"

When I remove " manually, gradients are imported correctly.
Comment 15 Kurosawa Takeshi 2011-02-14 20:01:49 UTC
This was fixed in git master. 
http://cgit.freedesktop.org/libreoffice/filters/commit/?id=81ffe030d75a7738a09688520fab9b7c3d2d472b

LibreOffice 3.4 will contain that fix.
Comment 16 Rainer Bielefeld Retired 2011-04-23 00:39:02 UTC
Bug 36511 - Wrong SVG rendering
Shows some similar effects. Can someone have a look?
Is the fix really integrated  into 3.4Beta2?