Hello, im using the following script to convert jpgs into grayscale-images. http://bubble.ro/How_to_convert_an_image_to_grayscale_using_PHP.html
i want to upgrade it to also convert pngs (with transparency) and gifs (with transparency) into grayscale images.
At the moment it's not working. I'm querying the image-src for its file-extension. If jpg, if, gif, or if png i call the appropriate imagecreatefrom-jpg-gif-png
However i'm always running the same for-loop and gifs unfortunately only get gray rectangles, every pixel is gray. Png's almost work, however transprency in pngs gets transformed to black.
Any ideas?