BGD_DECLARE(void) gdImageGifAnimAdd(gdImagePtr im, FILE *outFile, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm) { gdIOCtx *out = gdNewFileCtx(outFile); if (out == NULL) return; gdImageGifAnimAddCtx(im, out, LocalCM, LeftOfs, TopOfs, Delay, Disposal, previm); out->gd_free(out); }
/* Function: gdImageGifAnimAddPtr Like <gdImageGifAnimAdd> (which contains more information) except that it stores the data to write into memory and returns a pointer to it. This memory must be freed by the caller when it is no longer needed. **The caller must invoke <gdFree>(), not free(),** unless the caller is absolutely certain that the same implementations of malloc, free, etc. are used both at library build time and at application build time (but don't; it could always change). The 'size' parameter receives the total size of the block of memory. Parameters: im - The image to add. size - Output: the size of the resulting buffer. LocalCM - Flag. If 1, use a local color map for this frame. LeftOfs - Left offset of image in frame. TopOfs - Top offset of image in frame. Delay - Delay before next frame (in 1/100 seconds) Disposal - MODE: How to treat this frame when the next one loads. previm - NULL or a pointer to the previous image written. Returns: Pointer to the resulting data or NULL if an error occurred. */ BGD_DECLARE(void *) gdImageGifAnimAddPtr(gdImagePtr im, int *size, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm) { void *rv; gdIOCtx *out = gdNewDynamicCtx(2048, NULL); if (out == NULL) return NULL; gdImageGifAnimAddCtx(im, out, LocalCM, LeftOfs, TopOfs, Delay, Disposal, previm); rv = gdDPExtractData(out, size); out->gd_free(out); return rv; }
void graphicsGdImageGifAnimAddPort(gdImage *im, ScmPort *oport, int localCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImage *previm) { CALL_WITH_OCTX(oport, gdImageGifAnimAddCtx(im, ctx, localCM, LeftOfs, TopOfs, Delay, Disposal, previm), graphicsGdImageGifAnimAddPort); }