BGD_DECLARE(void) gdImageJpeg(gdImagePtr im, FILE *outFile, int quality) { gdIOCtx *out = gdNewFileCtx(outFile); if (out == NULL) return; gdImageJpegCtx(im, out, quality); out->gd_free(out); }
BGD_DECLARE(void *) gdImageJpegPtr (gdImagePtr im, int *size, int quality) { void *rv; gdIOCtx *out = gdNewDynamicCtx (2048, NULL); gdImageJpegCtx (im, out, quality); rv = gdDPExtractData (out, size); out->gd_free (out); return rv; }
void graphicsGdImageWriteAsJpeg(gdImage *im, ScmPort *port, int quality) { #ifdef GD_JPEG CALL_WITH_OCTX(port, gdImageJpegCtx(im, ctx, quality), graphicsGdImageWriteAsJpeg); #else graphicsGdRaiseCondition("unsupported format: %s", "Jpeg"); #endif /* GD_JPEG */ }
void gdImageJpeg (gdImagePtr im, FILE * outFile, int quality) { gdIOCtx *out = gdNewFileCtx (outFile); gdImageJpegCtx (im, out, quality); out->gd_free (out); }