diff options
Diffstat (limited to 'graphics/gd/files/gd_gif_out.c')
-rw-r--r-- | graphics/gd/files/gd_gif_out.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/graphics/gd/files/gd_gif_out.c b/graphics/gd/files/gd_gif_out.c new file mode 100644 index 000000000000..bc8a4f06d54b --- /dev/null +++ b/graphics/gd/files/gd_gif_out.c @@ -0,0 +1,44 @@ +#include <stdio.h> +#include <math.h> +#include <string.h> +#include <stdlib.h> +#include "gd.h" + +/* +** Wrapper functions for GIF output. +*/ + +void gdImageGifToSink(gdImagePtr im, gdSinkPtr outSink) +{ + gdIOCtx *out = gdNewSSCtx(NULL,outSink); + gdImageGifCtx(im, out); + out->gd_free(out); +} + +void gdImageGifCtx(gdImagePtr im, gdIOCtx *out) +{ +#ifdef LZW_LICENCED + gdImageLzwCtx(im, out); +#else + gdImageBigGifCtx(im, out); +#endif +} + +void gdImageGif(gdImagePtr im, FILE *outFile) +{ +#ifdef LZW_LICENCED + gdImageLzw(im, outFile); +#else + gdImageBigGif(im, outFile); +#endif +} + +void* gdImageGifPtr(gdImagePtr im, int *size) +{ +#ifdef LZW_LICENCED + return gdImageLzwPtr(im, size); +#else + return gdImageBigGifPtr(im, size); +#endif +} + |