Well, you could do it in GD by taking the color of each pixel, removing the saturation (i.e. setting it to 0), and replacing the pixel with the new color. But this, as you might imagine, would be horribly slow.
You're much better off using the Imagick extension, which I believe has a built-in function for this.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.