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?".
Which is not really good. I'm not even sure how is this operation called properly (tint, colorize?) - I'm new to graphics.
Can someone give me some hints for solving this problem?
Which is not really good. I'm not even sure how is this operation called properly (tint, colorize?) - I'm new to graphics.
Can someone give me some hints for solving this problem?
Thanks!
You can use the IM function -modulate to rotate the colors (by changing the hue in HSB colorspace)
where the 3 numbers are brightness, saturation and hue. 100 means no change. You may have to play with the third number to get the color you want as the results seem to depend upon what color your image is to begin with.
When I used 50, the result was a green color. When I used 0, the result was kind of yellow brown. When I used 150 (or -50), the result was magenta
It is a good idea for this type of work for the images to first be mapped to grayscale, and then to a red scale. After that rotations
can be coordinated for multiple images and hues (with red at 100)
Alternativally the grayscale version can be re-maped using the newer operator +level-colors ,{color}
The ',' is important as it means the first color will be the normal 'black' default, and you are only wanting to remap the white color.
Looking at your image again you have both black and white in your image you will want to preserve. What you wnt is to map the mid-gray color of a pure grayscale image (-colorspace gray) using -tint.
So you almost had it right, you just needed to remove the old mid-tone color back to a grey first. You can also adjust the gray as well using -tint with a gray color to get the base image right.
for i in * ; do convert $i -colorspace gray -fill "rgb(100,150,110)" -tint 110 $i; done;
Thank you guys for all help!
You better make sure you set the fill color before tinting, like you di for your second example.
If you tint the image with pure red, then you can use -modulate to rotate the colors through the spectrum to produce a range of different colored images.