about GD library

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bugthefixer
Forum Contributor
Posts: 118
Joined: Mon Mar 22, 2004 2:35 am

about GD library

Post by bugthefixer »

i m using php 4.3.. do i need to install GD libray..i m using LINUX as sever .how can i install this GD library.
one more thing
GD library 1.6 onwards does not support gif rather png..does php support this
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

It is recommended that use you use the GD version bundled with the PHP source, therefore you don't need to install GD.

Did you build the source yourself? or did you download a pre-built binary? If you have downloaded a pre-built binary then you can probably enable GD by uncommenting (or adding) the appropriate line in you php.ini file. If you built the source yourself then I'm assuming you did not compile with GD support.

In order to build with GD support you need to pass the '--with-gd' switch during configure. You will also require additional libraries dependant on what support you want with GD (e.g. libjpeg6b, libpng (requires zlib), freetype etc..) you will also need to pass the appropriate switches for these libs also.

GD2 does not support .gif image format, therefore a PHP installation with GD2 only will not support .gif image formats.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

It is also possible to load the library at runtime using the [php_man]dl[/php_man] function
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply