What can cause php gd to produce a black image after resizing? The following code always outputs a black image for every valid jpeg file.
Ensure gd is installed and enabled.
To check, create a PHP file with this command:
Access the file through a browser and scroll down to the gd section. If gd isn't there, or it is disabled, add it with yum, apt-get or the Windows equivalent.
You also need the GD library available (http://www.libgd.org/).
Consider switching to IMagick (http://php.net/manual/en/book.imagick.php) for better image quality.