Librairie graphique GD2
Un article de Wikiserveur.
| Cet article est une ébauche à compléter. |
GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and "wrappers" are available for Perl, PHP and other languages. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve web site development.
La commande suivante nous indique qu'il existe plusieurs versions de la librairie GD2 :
apt-cache search gd2
libgd2 - GD Graphics Library version 2 libgd2-dev - GD Graphics Library version 2 (development version) libgd2-noxpm - GD Graphics Library version 2 (without XPM support) libgd2-noxpm-dev - GD Graphics Library version 2 (development version) libgd2-xpm - GD Graphics Library version 2 libgd2-xpm-dev - GD Graphics Library version 2 (development version)
Installons la bonne version (à déterminer) :
apt-get install libgd2 php5-gd
Pour utiliser la librairie avec PHP, décommentez la ligne suivante dans /etc/php5/apache2/php.ini :
;extension=gd.so
Rechargez ensuite apache2
/etc/init.d/apache2 reload

