Download it now!
Bug 106573 - Transparency on SVG images not applied
Summary: Transparency on SVG images not applied
Status: RESOLVED DUPLICATE of bug 80421
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-16 13:40 UTC by Patrick T.
Modified: 2017-03-23 13:20 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
SVG with external transparency (153.65 KB, application/vnd.oasis.opendocument.text)
2017-03-16 19:12 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick T. 2017-03-16 13:40:32 UTC
Transparency on SVG images is not applied when specified.

Steps to reproduce:
- go to openstreetmap.org and export a part of a city by using the "share" button in the upper right corner using svg format and the rectangle-selection tool (so that you use a similar structured svg as I had) - my file had a size of about 3MB
- create a new document in LibreOffice Writer and insert this image using the menu; resize the image to fill the entire page
- right click on the image and choose "properties", click on the transparency tab, set it to 50% (fix) and proceed by clicking "ok"

expected:
- The image should be half transparent now.

seen:
- nothing has changed, transparency is ignored

workaround (for simple colored background):
- draw a new rectangle which overlays the image
- choose background color (e.g. white) as fill color
- set transparency of this rectangle according to your needs
Comment 1 Xisco Faulí 2017-03-16 16:43:07 UTC Comment hidden (obsolete)
Comment 2 Regina Henschel 2017-03-16 19:12:00 UTC
Created attachment 131944 [details]
SVG with external transparency

I think, that there is no error. With the transparency in the image properties dialog you define the background behind the image. If the image itself is totally opaque, you will not see this background. In file format that is the attribute draw:opacity for a solid transparency and draw:opacity-name for a gradient transparency. The SVG picture in the attachment has a solid green background with a gradient transparency.

To see this background, the image itself needs some transparency. That can be parts of the image by e.g. alpha channel, or you set the whole image to some transparency. That is done by the transparency field in the general picture dialog (the dialog with the color filters and gamma setting and effects like "Pop Art"). In file format it is the attribute draw:image-opacity.

The SVG in the attachment has a draw:image-opacity of 40% (=60% transparency). That makes it background visible and you can see, that the background has the filling which I described above.
Comment 3 Regina Henschel 2017-03-16 19:15:25 UTC
That feature is not specific for SVG but exists for raster images too.
Comment 4 Patrick T. 2017-03-16 19:35:48 UTC
Ok, I understand.

But I wonder why images are handled in a different way, compared to other drawing objects (like e.g. a filled rectangle)... So I would suggest a new option for images to switch transparency applying between "transparent background" (as it is seen today) and "complete picture" (as it is done with drawing objects). This would make application behavior more ... transparent. ;)
Comment 5 Regina Henschel 2017-03-16 22:56:48 UTC
See bug 80421 about having the image transparency in the properties dialog transparency tab in addition.
Comment 6 Buovjaga 2017-03-23 11:56:38 UTC
(In reply to Regina Henschel from comment #5)
> See bug 80421 about having the image transparency in the properties dialog
> transparency tab in addition.

Should this report be closed as duplicate of 80421, then?
Comment 7 Patrick T. 2017-03-23 13:20:59 UTC
Ok, marked as duplicate.

*** This bug has been marked as a duplicate of bug 80421 ***