|gdImagePtr gdImageCreateFromGif(||FILE ||*||fdFile||)|
gdImageCreateFromGif is called to load images from GIF format files. Invoke gdImageCreateFromGif with an already opened pointer to a file containing the desired image.
gdImageCreateFromGif returns a gdImagePtr to the new image, or NULL if unable to load the image (most often because the file is corrupt or does not contain a GIF image). gdImageCreateFromGif does not close the file. You can inspect the sx and sy members of the image to determine its size. The image must eventually be destroyed using gdImageDestroy.
gdImageCreateFromGifPtr creates an image from GIF data (i.e. the contents of a GIF file) already in memory.
gdImageCreateFromGifCtx reads in an image using the functions in a gdIOCtx struct.
|infile||The input FILE pointer|
A pointer to the new image or NULL if an error occurred.
... inside a function ...
in = fopen("mygif.gif", "rb");
im = gdImageCreateFromGif(in);
// ... Use the image ...
|gdImagePtr gdImageCreateFromGifPtr (||int ||size,|
|size||size of GIF data in bytes.|
|data||GIF data (i.e. contents of a GIF file).|