9951 explained code solutions for 126 technologies


php-gdHow to list supported formats


You can see list of supported formats by gd using php -i command and some grep to filter output:

php -i | grep gd -A 10 | grep Supportctrl + c
php -i

prints information on php system settings and enabled modules

grep gd -A 10

will filter everything that contains gd and print 10 lines after that

grep Support

will filter everything that contains Support


Usage example

php -i | grep gd -A 10 | grep Support
output
GD Support => enabled
FreeType Support => enabled
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
PNG Support => enabled