This might seem a really stupid question. I am new php image processing. I assume there are only two imageprocessing libraries in php. They are called GD/GD2 and Imagemagick. How do I know which I have installed? or if I have installed any? I have echo-ed phpinfo. It just says that GD imaging was created by Rasmus Lerdorf, Stig Bakken, Jim Winstead, Jouni Ahto, Ilia Alshanetsky, Pierre-Alain Joye, Marcus Boerger. I am really confused. Thanks in advance.
Yes, GD library is already installed on all of our servers. You can verify this information by checking in your phpinfo. php page.
echo "Version return code is $rcode <br>"; //Print the return code: 0 if OK, nonzero if error. echo alist($out); //Print the output of "convert -version" echo '<br>'; echo '<b>This should test for ImageMagick version 5.
GD is an open source code library for the dynamic creation of images. GD is used for creating PNG, JPEG and GIF images and is commonly used to generate charts, graphics, thumbnails on the fly. While not restricted to use on the web, the most common applications of GD involve web site development.
If you can get to the console of the server running PHP, type:
php -i | grep 'GD\|ImageMagick'
This will tell you if GD or ImageMagick is installed and running.
This is also a good answer that helped me. Thank you @Class
if(extension_loaded('gd')){/*loaded*/}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With