Need transparency for image in website

Post questions on how to use or achieve an effect in Inkscape.
skb
Posts: 1
Joined: Sun Jan 31, 2010 8:17 pm

Need transparency for image in website

Postby skb » Sun Jan 31, 2010 8:31 pm

Hello All,

I am new to the forum but have been using Inkscape for the last few weeks and so far exceeded by expectations!

I am designing a website and needed a cheap and cheerful graphics program for imagery/graphics, so downloaded Inkscape...

My question is this...how do I make the background of an image (in this case, a red coloured circle) transparent? Obviously, I am saving the file (as .png) and then copying and pasting the file into my images folder for my website. Since I have a chosen background colour for my entire website, I need the images (that I have spent a long time creating in Inkscape) to have a completely transparent background colour. The circle is 25 px by 25 px - I have gone to File>Document Properties and clicked on "Fit page to selection" and then saved as .png - In the Document Properties pop-up, it does indicate that the background is set to transparent...so basically I don't know what else I might be doing wrong...can anyone help?

Any advice or direction will be greatly appreciated.

Many thanks,
skb

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: Need transparency for image in website

Postby sas » Sun Jan 31, 2010 11:44 pm

skb wrote:I am saving the file (as .png)

If you mean that you are using the "Cairo PNG" option in the Save As dialog, then that's what you're doing wrong. The Cairo PNG option is experimental and essentially useless, and appears to have been left in by mistake. Use Export Bitmap (on the File menu) instead.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Need transparency for image in website

Postby brynn » Mon Feb 01, 2010 2:34 pm

Welcome to the forum, skb!

As you have learned, all Inkscape backgrounds are transparent by default. But when you said this
how do I make the background of an image (in this case, a red coloured circle) transparent?

and
I need the images (that I have spent a long time creating in Inkscape) to have a completely transparent background colour.

it makes me think that you may be confused by terminology.

It sounds like you're thinking that the red 25x25 px circle is the background. But really, the image is 25x25px square (because you used Fit page to selection). And within that is a red circle, with some sort of icon (I'm guessing) on top of the red circle? So what you reallly have is an image consisting of a red circle with an icon on top. The background IS transparent. But the red circle is not the background, it's part of the image.

So you could do 2 things:
1 - Select the red circle, open Fill and Stroke dialog, move the Opacity slider all the way to 0. This makes the red circle completely transparent (and therefore no longer red).
2 - But if it's going to be transparent anyway, maybe you could just delete it?

But I'm thinking that there must be something important about the circle, and that you still want the icon (or whatever it is) to look like it's in a circle? This can be achieved in Inkscape, in probably a few different ways. But I think we need a little more info from you, before trying to suggest ways to do it.

If you could give us some idea of the effect you're trying to achieve, then we can decide what might be the best way to do it. Like if you have an example of what you want it to look like, in general, when finished, or even if you could describe it, would be very helpful.

And also, as sas suggested, Export Bitmap is probably better than Save As, in this situation.


Return to “Help with using Inkscape”