Colorizing imported grayscale bitmaps

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Marcelo
Posts: 35
Joined: Thu Jul 09, 2009 12:18 pm
Location: Buenos Aires, Argentina
Contact:

Colorizing imported grayscale bitmaps

Postby Marcelo » Thu Aug 26, 2010 3:00 pm

Hi,

I hope to have searched enough, but I just can't find how to colorize an imported grayscale image. Filter > Colorize seems not to be the answer, since it just modifies the white area, and black remains black.

In FreeHand, Illustrator and InDesign, for example, you just give a color to the imported or placed bitmap, as easy as doing it with any path or shape... and that's all, we have a color monocrome image in which former black gets 100% saturation of the chosen color. No need to use filters or tricks.

Is there a simple way for Inkscape?

Thanks very much.

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

Re: Colorizing imported grayscale bitmaps

Postby brynn » Sun Aug 29, 2010 6:01 am

Hhhm....
No, not if I understand what you're talking about, I don't think so. Although there may well be some extension or filter out there somewhere.

You're saying you have a grayscale image, and you want the 100% black to be some other color, and every shade of gray therein to be a shade of that same color. It sounds like something well suited for raster graphics, so I wouldn't be surprised if Inkscape is incapable.

But hang in there. I could be wrong, and maybe someone else will know of something.

Edit -- I just tried the Colorize filter, and it did exactly what I understood you to describe. So I think I do not clearly understand what you need. .....Although, I applied it to a simple grayscale SVG image that I created in Inkscape.

Try this:
1 - Import the bitmap
2 - Path menu > Trace bitmap
3 - tweak the results if necessary
4 - Save as SVG
5 - Apply Colorize filter

If your grayscale image is anything but very simple, trace bitmap will probably not suit your needs. And otherwise, as far as the quick testing I've just done, that filter won't work on a bitmap image. I recently found another tracer online here: http://www.roitsystems.com/cgi-bin/autotrace/tracer.pl Even though it appears to do the trace differently, and perhaps handles more detail that Trace Bitmap, if your image is very detailed, you probably won't like the results
Last edited by brynn on Sun Aug 29, 2010 6:42 am, edited 1 time in total.
Reason: add more info

User avatar
Marcelo
Posts: 35
Joined: Thu Jul 09, 2009 12:18 pm
Location: Buenos Aires, Argentina
Contact:

Re: Colorizing imported grayscale bitmaps

Postby Marcelo » Thu Jan 27, 2011 1:39 am

Hey. I submited my 'thank you' reply here + some further explanation and new questions through the 'full editor' about 15 days ago. It said my text was waiting approval... but never showed up.

Should I write all again?

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

Re: Colorizing imported grayscale bitmaps

Postby ivan louette » Thu Jan 27, 2011 2:42 am

Colorize has several settings. I join a duotone example ; only open it, import your bitmap, apply the filter through the Filters Editor and change the Flood color in this Editor.

ivan
Attachments
colorize-duotone.svg
(2.21 KiB) Downloaded 311 times

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

Re: Colorizing imported grayscale bitmaps

Postby brynn » Fri Jan 28, 2011 2:13 am

Hi Marcel,
Not sure what might have happened to your previous message. We're trying some new software to help with spam in the forum, and also trying to learn how to use it properly. So it could have been accidentally deleted. I apologize for the inconvenience.

Please post your message again :D

User avatar
Marcelo
Posts: 35
Joined: Thu Jul 09, 2009 12:18 pm
Location: Buenos Aires, Argentina
Contact:

Re: Colorizing imported grayscale bitmaps

Postby Marcelo » Wed Feb 09, 2011 7:55 am

Hi, long time after...

thanks for the answers. No need to post again after Ivan's example. That's exactly what I needed, although it looks such a complicate configuration that I wouldn't discover it by myself.

In any case, just perfect. Another custom I won't miss. Thanks so much.

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

Re: Colorizing imported grayscale bitmaps

Postby ivan louette » Thu Feb 10, 2011 2:10 am

Thanks and no problem for the delay :)

Here are simpler again duotone formulas. In any cases for rectangular pictures you may even click on the last Composite in the list and remove it.

And if your image is already greyscale you can even use the most simple with only two primitives.

The more complicated filter was the result of the full options custom colorize filter but for simple duotone these ones should be enough.

ivan
Attachments
colsimpl.svg
(2.25 KiB) Downloaded 271 times

chriswww
Posts: 383
Joined: Fri Nov 19, 2010 3:04 pm

Re: Colorizing imported grayscale bitmaps

Postby chriswww » Thu Feb 10, 2011 12:59 pm

i thought you could even achieve (?) the colorize with a (standard svg) color matrix filter. if you want a 100% black region to become some hue, than it will have to be 99.999% black(ish). black being (converted) to black of some hue is an artifice of whatever program. as black really is just black and not any other RGB or other hue. The above workaround for inkscape and other programs, e.g. say assign RGB 0,0,1 to black should hopefully do and not be really a visible blue. i couldn't see the difference between that and black anyway. and then if you need to manipulate that it's part of the blue hue.


Return to “Help with using Inkscape”