Hi,
I'm using Inkscape 0.48 running n Gentoo linux. I would like to make an svg signature to put in word processor documents, specifically Libre-Office 3.3.4. I need a signature with a transparent background. This is easy to do with a scanned signature, and GIMP, producing a png file, and I've done this, and it works well.
As part of learning Inkscape, I tried to replicate this in an SVG file. I used the Path Trace Bitmap tool, set to grey levels, on my original png file, and got a very nice smooth signature. I resized the page from A4, to the object size, with margins of 0.1 cm. I then tried two ways of saving this - one as an svg file, and one as a Cairo png file. Both files give me a nice image with a white background in firefox, gwenview (for the png only), and LibreOffice. This isn't what I want. I'm sure I can make the png version have a transparent background in GIMP, but I already have this, so I don't need to do it again.
I've searched the forums, Google, and read brynn's very useful tutorial on transparency and clipping (viewtopic.php?f=6&t=6616). He states that the default background in Inkscape is transparent. I've checked carefully. Using Object Fill and Stroke on my svg image, I get 'Paint is undefined'. Using Document properties, I get a background set to 00000000, i.e. the alpha channel is set to 00, which I think is fully transparent. I also tried setting the alpha to 255, which gave me, in Inkscape, a white rectangle, with my signature on it, on top of a black background. Saving this I still have a white background.
I'm sure I'm doing something silly. For example, perhaps the Path Trace has also traced a rectangle outside the signature, which is coming up white. I can't figure out how to chop the image into it's constituent paths to check this.
I'd be grateful for any advice,
Anthony Staines
PS A (possibly) relevant bit of the xml is :- (note the pageopacity = 0 )
<sodipodi:namedview
id="base"
pagecolor="#000000"
bordercolor="#37b6b6"
borderopacity="1"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.70286062"
inkscape:cx="555.30165"
inkscape:cy="73.010961"
inkscape:document-units="cm"
inkscape:current-layer="g2994"
showgrid="true"
units="cm"
inkscape:window-width="1280"
inkscape:window-height="723"
inkscape:window-x="-2"
inkscape:window-y="27"
inkscape:window-maximized="1"
borderlayer="false"
showborder="false"
fit-margin-top="0.2"
fit-margin-left="0.2"
fit-margin-right="0.2"
fit-margin-bottom="0.2"
inkscape:showpageshadow="false">
Making an svg signature with a transparent background
Re: Making an svg signature with a transparent background
Hi Anthony,
Instead of Save As Cairo PNG, unless that's required for Libre Office (I'm not familiar), you should use File menu > Export Bitmap. (bitmap meaning raster format in this case) That will preserve the transparency. Currently PNG is the only raster format that can be exported, but more formats are planned for the future.
Let us know if that works
Instead of Save As Cairo PNG, unless that's required for Libre Office (I'm not familiar), you should use File menu > Export Bitmap. (bitmap meaning raster format in this case) That will preserve the transparency. Currently PNG is the only raster format that can be exported, but more formats are planned for the future.
Let us know if that works

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: Making an svg signature with a transparent background
astaines wrote:I'm sure I'm doing something silly. For example, perhaps the Path Trace has also traced a rectangle outside the signature, which is coming up white. I can't figure out how to chop the image into it's constituent paths to check this.
You've likely traced the background. Select the traced thing, and move it to an empty area. "Ungroup" it. Click a background part of the trace, and press delete.
You can now select what's left (and regroup it, if you want) and export that.
Re: Making an svg signature with a transparent background
To Brynn - First, thanks for your great tutorial, which I found really helpful. What you suggest, save as bitmap, does work, and works well, so thanks! But, it isn't what I'm trying to do. I already have a png with a transparent background. But what I'm trying to do is to get an SVG file, which Libre-Office can read directly, with a transparent background. For me, this is an approach to learning more about Inkscape.
To SlowDog - I'm not at the right computer, but I'll try it this evening. Many thanks for your answer,
All the best,
Anthony
To SlowDog - I'm not at the right computer, but I'll try it this evening. Many thanks for your answer,
All the best,
Anthony
Re: Making an svg signature with a transparent background
Oh ok, I misunderstood the problem. Yes, I agree, that it sounds like if the background wasn't purely and entirely #ffffff, Inkscape probably traced parts of the background. Slow Dog's instructions should work 
If not, you could probably tweak the settings on the Options tab of the Trace Bitmap dialog and get a better trace. It can removed speckles, etc. Or depending on the other options you might have used, changing the Threshold might also help.
If you find that you can't get the signature separated from the background, try the SIOX Foreground Selection method of tracing with Trace Bitmap. Instructions are in my tutorial under the section titled Rendering, the 3rd mini-tut in that section. It's the 2nd procedure in which I used the owl photo as an illustration. I have no idea if it would work on something like a signature, but would be worth a try, if all the other tips don't help

If not, you could probably tweak the settings on the Options tab of the Trace Bitmap dialog and get a better trace. It can removed speckles, etc. Or depending on the other options you might have used, changing the Threshold might also help.
If you find that you can't get the signature separated from the background, try the SIOX Foreground Selection method of tracing with Trace Bitmap. Instructions are in my tutorial under the section titled Rendering, the 3rd mini-tut in that section. It's the 2nd procedure in which I used the owl photo as an illustration. I have no idea if it would work on something like a signature, but would be worth a try, if all the other tips don't help

Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design