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

Link to comment
Share on other sites

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()

Link to comment
Share on other sites

-thanks barand that clears things up

but:

 

how I do I save a raw gd image

after I run the url through this function: imagecreatefromjpeg()

 

i know i can save the variable in a session or a cookie, but as far as physically saving it?

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.