6

Reading the documentation for imagegd2(), and imagegd(), I noticed the functions are described, respectively as:

  • Output GD2 image to browser or file
  • Output GD image to browser or file

What are a GD2, and a GD image? What are the difference between those image types?

hakre
  • 193,403
  • 52
  • 435
  • 836
DEVOPS
  • 18,190
  • 34
  • 95
  • 118

2 Answers2

7

gd is an old c library, gd2 is the updated one. php uses gd2.

Jacco
  • 23,534
  • 17
  • 88
  • 105
1

Some version of GD generates only PNG, but recent version can ganerate GIF and PNG. Soon GD 1 will be no longer supported in next version of PHP.

Álvaro González
  • 142,137
  • 41
  • 261
  • 360
Brice Favre
  • 1,511
  • 1
  • 15
  • 34
  • "Soon GD will be no longer supported in next version of PHP." please add a reference/link to support this claim? – Jacco Jun 15 '10 at 10:47
  • Here it is : http://wiki.php.net/rfc/removal-of-deprecated-features Support for Freetype 1 and GD 1 - See R197385, R197386, R203752 and family commits – Brice Favre Jun 15 '10 at 13:29
  • 1
    GD 1 will no longer be supported. That makes sense. GD2 support will stay. – Jacco Jun 16 '10 at 21:06