How does one go about converting an image to black and white in PHP?
Not just turning it into greyscale but every pixel made black or white?
Using the php gd library:
imagefilter($im, IMG_FILTER_GRAYSCALE);
imagefilter($im, IMG_FILTER_CONTRAST, -100);
Check the user comments in the link above for more examples.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With