Do like color function in Gimp

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Poncho

Do like color function in Gimp

Post by Poncho »

Hi,

I got some text in images and want to change the colour with overlay image set on 'COLOR' like in GIMP. This way I get exactly the right coloured text. I tried already some stuff, but I got too dark result with 'colorize'.

Like this in gimp (see image full here: http://lars.stonerocket.co.uk/images/re ... k-GIMP.png):

Image
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Do like color function in Gimp

Post by fmw42 »

try

convert -background none -pointsize 48 -font Candice -fill red -strokewidth 1 -stroke black label:"ABCDEFGHIJPLMNOPQRSTUVWXYZ" alphabet1.png

Image

then

convert alphabet1.png -colorspace gray -auto-level +level-colors black,skyblue alphabet2.png

Image
Poncho

Re: Do like color function in Gimp

Post by Poncho »

Thank you for the help. This seems to be good.

I changed it like this and add some python:

Code: Select all

"convert result.png -colorspace gray -auto-level +level-colors black,%s result.png" % (color)
Where color can be rgb(0,0,0) or #000000 (html).
Post Reply