Page 1 of 1

image color change with transparency (sample code inside)

Posted: 2007-10-31T00:59:37-07:00
by Ravinderjit S.Sidhu

Code: Select all

convert    input.png    -fill #EAAB01 -opaque #000000  -colorize 100%   output.png

input.png file contains a single shape whose color is black (#000000).

The above statement changes this black color (#000000) into Yellow color (#EAAB01) of the image and we gets the new image in (output.png).

My question is : How I can get output image with yellow color (#EAAB01) with some transparency (alpha).

Re: image color change with transparency (sample code inside)

Posted: 2007-10-31T06:40:40-07:00
by magick
You can introduce transparency by adding alpha to your opaque color value (e.g. #000000cc). You may need the -matte option to tell ImageMagick you want an alpha channel in your image.

Re: image color change with transparency (sample code inside)

Posted: 2007-11-15T21:44:37-07:00
by anthony
An example image can also help. For example is the shape anti-aliased or what. Usually a shape is defined as either a greyscale mask, or a colored shape on transparency, the example will let us know exactly what you are dealing with.