Jump to content

[SOLVED] imagecreatefromgd() and imagecreatefromgd2()


dsaba

Recommended Posts

Hey guys! I looked on php.net, googled, and searched these forums first

BUT- I didn't find any really good documentation on what these functions do and what the difference is between them.

 

I THINK that this function imagecreatefromgd() will do what imagecreatefromjpeg, gif, png...etc...

except it will automatically recognize what type it is, jpeg, gif, etc...

 

is that what it does?

and what's the difference between imagecreatefromgd2 and imagecreatfromdg

-thanks

If you regulary use the same image  (say as as a background image on which you overlay different text messages) then you can speed things up by saving the image as raw gd code and loading that instead. If you use "imagecreatefromjpeg()" it has to convert the image internally.

 

You save as a raw gd image with

 

imagegd(), or

imagegd2()

 

then use

 

imagecreatefromgd() to load the file.

 

If you saved with imagegd2(), load with imagecreatefromgd2()

no notes, it takes a while for your note to appear on all mirrors at php.net

 

but i didn't know about that function, i guess its pretty obvious now huh? :)

 

B -brilliant

A - answers questions effectively

R - read the question effectively

A - answers the question effectively again if he didn't already

N - need i say more?

D - da man!

 

*yeah i just realized i misunderstood you :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.