bitmap and color fill

Post questions on how to use or achieve an effect in Inkscape.
YamaNoOto

bitmap and color fill

Postby YamaNoOto » Sat Feb 06, 2010 11:56 pm

Hi,

I would like to do the following:

1. import a bitmap
2. fill the entire bitmap rectangle with a color usign multiply as blend operation

I want to obtain an effect similar to the usual multiply operation between vertex color and texture color on, say, OpenGL.

Looking at the xml code I see that inkscape save the color fill attribute of an imported bitmap; but I cannot see any difference in the image after I have filled it with a color. I have tried using filters, also custom filter but the blend filter doesn't work fine: I have tried with SourceGraphic and FillColor as input, with blend operation set to multiply but nothing visible happens.

Of course I may do the following: add a new (independent) rectangle in a different layer, fill it with any color and use the multiply effect between layers. But I prefer not to do the following since I have to parse the xml code with a python script and it could become difficult to relate the rectangle with the imported bitmap...

Could anyone help?

PS: I apologize for my english and I have to say that I am not an expert of inkscape.

Many thanks.

ivan louette
Posts: 215
Joined: Thu Aug 21, 2008 4:08 am
Location: Belgium

Re: bitmap and color fill

Postby ivan louette » Sun Feb 07, 2010 3:46 am

Add a new layer on top of the one which contains your bitmap ;

Create your color rectangle in this new layer ;

Change the Layer Blend Mode to Multiply.

ivan

Guest

Re: bitmap and color fill

Postby Guest » Sun Feb 07, 2010 7:39 am

Hi Ivan,

thank you for your reply. But I had already described the procedure you suggest in my post... and also the reason why I prefer not to follow it...

Ciao.

ivan louette
Posts: 215
Joined: Thu Aug 21, 2008 4:08 am
Location: Belgium

Re: bitmap and color fill

Postby ivan louette » Sun Feb 07, 2010 7:44 am

Sorry ! I was too fast and didn't quote the layer part :-)

ivan


Return to “Help with using Inkscape”