Trouble with tinting/colorizing an image..

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
pezz

Trouble with tinting/colorizing an image..

Post by pezz »

Greetings all!

I have an image I wish to tint/colorize towards a blueish colour, however I cannot seem to produce the desired result by using colorizeImage.
I've also tried with various other functions, for instance tintImage, but nothing seems to work for me..
So I'm hoping a kind soul here might be able to help me in the right direction :)
!example.png
!example.png (17.24 KiB) Viewed 4876 times
The line of code I've used to produce the above result was:

Code: Select all

$im->colorizeImage('rgb(0,0,255)',1);
I basically want to be able to do the following command inside php (without exec):

Code: Select all

convert test.png -fill blue -colorize 100%   colorize_shape.png
(From http://www.imagemagick.org/Usage/color/#colorize).
Post Reply