Results 1 to 10 of 10
Apr 24, 2014, 07:08 #1
- Join Date
- Sep 2005
- 5 Post(s)
- 0 Thread(s)
Change Color of image using Imagick
So I have an image that has various shades of grey (I converted it to grayscale). And what I would like to allow the user to do is convert the image to a different color by selecting from a color picker (applying a hex code basically).
$shading = new Imagick($this->shading);
$this->blank->compositeImage($shading, Imagick::COMPOSITE_DEFAULT, 0,0);
The code does change the color of the grayscale image; but it doesn't do it 100% correctly. For example, if I open photoshop and use the color code #5780bd and change the shading image to that color by using the pencil tool or w/e, the image color is noticeably different.
If anyone has any advice on how to accomplish coloring a gray-scale image to a hex code then that would be great. I'm not sure whether the original image should be grayscale or if it should be black or white or anything in order to achieve correct colorization.