Jul 06

how to check if php suport jpeg or png

how to check if your php support jpeg or png on your web server? you can create a phpinfo page to check the gd section. or you can run the following command directly in your shell:

# php -r 'print_r(gd_info());'
Array
(
 [GD Version] => bundled (2.0.34 compatible)
 [FreeType Support] =>
 [T1Lib Support] =>
 [GIF Read Support] => 1
 [GIF Create Support] => 1
 [JPEG Support] =>
 [PNG Support] => 1
 [WBMP Support] => 1
 [XPM Support] =>
 [XBM Support] => 1
 [JIS-mapped Japanese Font Support] =>
)