Page 1 of 1

PHP-Image - Using GD in PHP (Help!)

Posted: Fri Jan 04, 2008 5:13 pm
by refined
I have an image, greyscale.

I want to convert everything that is *NOT* white to black.

How can I do this? Is there such a function that exists to convert a greyscale image to 100% black or 100% white ?

Posted: Fri Jan 04, 2008 6:06 pm
by alex.barylski
I was certain there was a function in hte GD library which did just that...but I cannot find it so perhaps it was from another library...

Anyways, still do-able...just more work:

imagesetpixel
imagecolorat

Just converting everything *not* white to black will not convert a greyscale image to black and white...well it will...but the image will likely be skewed...