What are the differences between a GD and a GD2 image?
Asked Answered
S

2

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?

Shavonda answered 14/6, 2010 at 5:58 Comment(2)
Where do you see them as being different?Nidia
In php.net I saw two functions imagegd2 :- Output GD2 image to browser or file imagegd — Output GD image to browser or file So I asked?Shavonda
S
7

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

Swearword answered 14/6, 2010 at 6:16 Comment(3)
Are there any bc breaks?Artair
@JosefSábl, GD has been phased out more than 6 years ago; the question of backward compatibility is no longer relevant.Swearword
I'm using laravel. but In it, Image Driver is gd. Isn't it gd2?Terni
G
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.

Gendarmerie answered 14/6, 2010 at 8:0 Comment(3)
"Soon GD will be no longer supported in next version of PHP." please add a reference/link to support this claim?Swearword
Here it is : wiki.php.net/rfc/removal-of-deprecated-features Support for Freetype 1 and GD 1 - See R197385, R197386, R203752 and family commitsGendarmerie
GD 1 will no longer be supported. That makes sense. GD2 support will stay.Swearword

© 2022 - 2024 — McMap. All rights reserved.