how can I set the backgroung of a jpg to transparent

Asked by waltones

How can I set the transparency of an element.

My file is in SVG format.
It is a two clour logo - red and black on a white background.

I want to make the balck elements transparent so that when I print the logo on white paper it will appear red and white. When I select black elements and use Edit fill to change their opacity they take on the red colour of the neighbouring bojects, and not the white colour of the background or the grey checks I might expect to show they are transparent.
I thought this might be because the black elements lie in a layer on top of the red ones - however when I reverse the process and try to make the red elements transparent they go black.

Any Ideas about how I can change this?

Ideally I would like to use an eyedropper tool to select the colour, and then tell inkscape to treat every use of that colour as transparent.

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
faceman (faceman) said :
#1

I think you will have to provide the file so we can determine what the problem is - can you attach it?

Revision history for this message
waltones (jacksndown) said :
#2

Here's the actual image..

Revision history for this message
Krzysztof Kosinski (tweenk) said :
#3

You options are:

a) Make the black objects opaque white. However, this won't work if you want to export this image and put it on a web page, where the transparency matters.

b) Convert the black elements to clipping paths. This is the "right way" to do this. Here is how:
1. Draw a rectangle that will cover all the black and red elements, then press "End" to send it to the bottom of the layer.
2. Select all black elements and then do Path->Union. You will have to ungroup any groups and unlink any clones if you have any - if you do, press Ctrl+Shift+G until you have no more groups in selection and then Shift+Alt+D until you have no clones.
3. Select the merged black elements (they will now be a single object) and the rectangle, make Path->Difference. You will get a rectangle with holes in places where the black elements were.
4. Select all red elements and press End to move them below the rectangle with holes.
5. Select everything (Ctrl+A) and use the command Object->Clip->Set
This "cut out" the black parts out of the red elements. However, this might not work if the red elements overlap or are stacked in a complicated way with the black elements.

Revision history for this message
firebird (nikkie-childrensprogress) said :
#4

I have a follow-up question re: this item. Not sure if I should create a new question separately or write it here??...

Krzysztof Kosiński's suggestion works for vector art, but what about for a raster image that is inserted into an Inkscape SVG file? How can I make a single color transparent (i.e. if it's a cartoon with 3 colors, I want only 1 color to be transparent)?

I can't convert separate elements of the image to clipping paths, since it's raster. What to do?...

Thanks!

Revision history for this message
Ken Kupchick (kedoku28) said :
#5

I'm trying to follow you. I'm trying to eliminate a white background surrounding a multicolored logo. When I get to step 2, how do you select elements in a jpg? It's all a single image, it's not a matter of groups or elements. Please further define the instruction.

Can you help with this problem?

Provide an answer of your own, or ask waltones for more information if necessary.

To post a message you must log in.