Post Thu Apr 08, 2010 8:40 am

Compatibility with PHP 5.3

In PHP 5.3 gd_info returned info changed.
From php.net site:

Note: Previous to PHP 5.3.0, the JPEG Support attribute was named JPG Support.


So, test in
  Code:
if (!$info['JPG Support']) return 2; // No Jpeg Support

fails for this reason.

Here you have to test for PHP version and if 5.3 found, then check for $info['JPEG Support'],
else for $info['JPG Support']