Here's another original image:
https://postimg.org/image/bpig021c1/
What I'm trying to achieve:
https://postimg.org/image/vguq10pr5/
This is what I get currently...
https://postimg.org/image/3ky9pvqg7/
...using the .NET wrapper:
image.Colorize(new MagickColor("#ffff00"), (Percentage)50);
Instead of washing out the black/white hues, I'd like to only saturate the various shades of grey with shades of whatever hex color I pass in.
If you load up Photoshop, go to Image > Hue/Saturation and configure the HSL for 60/70%/50%, you'll get the desired result.
How would I go about doing this, given these values?
Need assistance on colorizing a grayscale image without affecting black/white hues
-
- Posts: 2
- Joined: 2016-07-18T13:34:55-07:00
- Authentication code: 1151
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Need assistance on colorizing a grayscale image without affecting black/white hues
Try this (unix syntax). Please always provide your IM version and platform when asking questions on this forum, since syntax may vary.
If on unix systems, see my script tintilize at the link below.
Code: Select all
convert background1_original.jpg \
\( -size 1x1 xc:black xc:"hsl(60,70%,50%)" xc:white +append -resize 512x1! \) \
-interpolate bilinear -clut result.jpg
-
- Posts: 2
- Joined: 2016-07-18T13:34:55-07:00
- Authentication code: 1151
Re: Need assistance on colorizing a grayscale image without affecting black/white hues
Thanks a million! Going to try this out
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: Need assistance on colorizing a grayscale image without affecting black/white hues
Like the idea fmw42 provided above, I'd probably create a color lookup table to apply to the original image. Using IM7 on a Windows 7 64 system I can get a near match to your "background1_edited.jpg" example with a command like this...BenFacilis wrote:How would I go about doing this, given these values?
Code: Select all
magick background1_original.jpg ^
( -size 1x256 gradient:#000000-#dddd33 gradient:#dddd33-#ffffff -append ) -clut output.jpg
Also as fmw42 mentioned, the exact syntax would depend on your version of IM and your operating system.