Question 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
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Question about GD library.

Post by kaisellgren »

Hi,

I'm working on with GD library. I started wondering that is PHP 5.1.2 >= always bundled with GD2+? Are there cases where GD version is below 2 with PHP 5.1.2 >= ?

Also, is it common to disable any of these on web servers?

Code: Select all

Freetype Support
GIF Read Support
GIF Create Support
JPG Support
PNG Support
WBMP Support
XBM Support
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Question about GD library.

Post by Mark Baker »

JPG is disabled by default unless you build PHP with --with-jpeg-dir pointing to the libjpeg source code

Freetype also needs to be built explicitly into PHP
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: Question about GD library.

Post by kaisellgren »

Mark Baker wrote:JPG is disabled by default unless you build PHP with --with-jpeg-dir pointing to the libjpeg source code

Freetype also needs to be built explicitly into PHP
Hmm do you know that is GD version >= 2.0.28 in PHP 5?
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Question about GD library.

Post by Mark Baker »

kaisellgren wrote:Hmm do you know that is GD version >= 2.0.28 in PHP 5?
Can't recall off the top of my head.

I had to do a rebuild of PHP 5.2.5 in work last week to enable JPG in GD, but I won't be back in the office again till the new year.

On my servers at home I currently have GD 2.0.34 with PHP 5.2.6
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: Question about GD library.

Post by kaisellgren »

Mark Baker wrote:
kaisellgren wrote:Hmm do you know that is GD version >= 2.0.28 in PHP 5?
Can't recall off the top of my head.

I had to do a rebuild of PHP 5.2.5 in work last week to enable JPG in GD, but I won't be back in the office again till the new year.

On my servers at home I currently have GD 2.0.34 with PHP 5.2.6
Hmm. So the JPG/PNG/GIF/Freetype supports can not be assumed at all.. But I'm wondering if the GD 2 is always the version that PHP 5 uses... if anyone could confirm this?
Post Reply