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 ?
PHP-Image - Using GD in PHP (Help!)
Moderator: General Moderators
-
alex.barylski
- DevNet Evangelist
- Posts: 6267
- Joined: Tue Dec 21, 2004 5:00 pm
- Location: Winnipeg
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...
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...