1

I have an image that I want to use as a SVG marker in Print Composer.

I created it as a .png file in Inkscape and then saved it as .svg. But the background transparency does not come across from the png to the svg.

So I guess I have two questions. Can I adjust the transparency of the svg background in QGIS when I set the icon style? (and by default, how?)

And, if not, does anyone know how I can preserve the transparency when I create the svg in Inkscape?

1

The issue was with my use of Inkscape. I tried again using Paint.Net as my image editing program and created a transparent background.

Then in Inkscape I was able to save the .png as .svg and use it in my styles.

0

You can set the background transparency in Inkscape. Go to File > Document Properties… (shift+ctrl+D). In the Page tab (should be open by default), at the bottom,you can set the background color and border color for the SVG.

To be able to adjust colors, stroke width etc. of SVG markers within QGIS, you will have to edit the SVG tags manually (as text) and replace those parameters with variables QGIS will recognize (as here). These variables include fill, outline, and stroke-width… I do not know if such a variable exists for background color.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.