Lines Matching refs:ctx

1319 static int _php_ctx_getmbi(gdIOCtx *ctx)  in _php_ctx_getmbi()  argument
1324 i = (ctx->getC)(ctx); in _php_ctx_getmbi()
1828 gdIOCtx *ctx = NULL; in PHP_FUNCTION() local
1843 ctx = create_stream_context(stream, 1); in PHP_FUNCTION()
1845 ctx = create_output_context(); in PHP_FUNCTION()
1858 gdImageXbmCtx(im, file ? file : "", (int) foreground_color, ctx); in PHP_FUNCTION()
1860 ctx->gd_free(ctx); in PHP_FUNCTION()
1917 gdIOCtx *ctx = NULL; in PHP_FUNCTION() local
1927 ctx = create_stream_context_from_zval(to_zval); in PHP_FUNCTION()
1928 if (!ctx) { in PHP_FUNCTION()
1932 ctx = create_output_context(); in PHP_FUNCTION()
1945 gdImageWBMPCtx(im, foreground_color, ctx); in PHP_FUNCTION()
1947 ctx->gd_free(ctx); in PHP_FUNCTION()
1974 gdIOCtx *ctx = NULL; in PHP_FUNCTION() local
1984 ctx = create_stream_context_from_zval(to_zval); in PHP_FUNCTION()
1985 if (!ctx) { in PHP_FUNCTION()
1989 ctx = create_output_context(); in PHP_FUNCTION()
1992 gdImageBmpCtx(im, ctx, (int) compressed); in PHP_FUNCTION()
1994 ctx->gd_free(ctx); in PHP_FUNCTION()
3983 #define CTX_PUTC(c,ctx) ctx->putC(ctx, c) argument
3985 static void _php_image_output_putc(struct gdIOCtx *ctx, int c) /* {{{ */ in _php_image_output_putc() argument
3995 static int _php_image_output_putbuf(struct gdIOCtx *ctx, const void* buf, int l) /* {{{ */ in _php_image_output_putbuf() argument
4000 static void _php_image_output_ctxfree(struct gdIOCtx *ctx) /* {{{ */ in _php_image_output_ctxfree() argument
4002 efree(ctx); in _php_image_output_ctxfree()
4005 static void _php_image_stream_putc(struct gdIOCtx *ctx, int c) /* {{{ */ { in _php_image_stream_putc() argument
4007 php_stream * stream = (php_stream *)ctx->data; in _php_image_stream_putc()
4011 static int _php_image_stream_putbuf(struct gdIOCtx *ctx, const void* buf, int l) /* {{{ */ in _php_image_stream_putbuf() argument
4013 php_stream * stream = (php_stream *)ctx->data; in _php_image_stream_putbuf()
4017 static void _php_image_stream_ctxfree(struct gdIOCtx *ctx) /* {{{ */ in _php_image_stream_ctxfree() argument
4019 if(ctx->data) { in _php_image_stream_ctxfree()
4020 ctx->data = NULL; in _php_image_stream_ctxfree()
4022 efree(ctx); in _php_image_stream_ctxfree()
4025 static void _php_image_stream_ctxfreeandclose(struct gdIOCtx *ctx) /* {{{ */ in _php_image_stream_ctxfreeandclose() argument
4027 if(ctx->data) { in _php_image_stream_ctxfreeandclose()
4028 php_stream_close((php_stream *) ctx->data); in _php_image_stream_ctxfreeandclose()
4029 ctx->data = NULL; in _php_image_stream_ctxfreeandclose()
4031 efree(ctx); in _php_image_stream_ctxfreeandclose()
4063 gdIOCtx *ctx = ecalloc(1, sizeof(gdIOCtx)); in create_stream_context() local
4065 ctx->putC = _php_image_stream_putc; in create_stream_context()
4066 ctx->putBuf = _php_image_stream_putbuf; in create_stream_context()
4068 ctx->gd_free = _php_image_stream_ctxfreeandclose; in create_stream_context()
4070 ctx->gd_free = _php_image_stream_ctxfree; in create_stream_context()
4072 ctx->data = (void *)stream; in create_stream_context()
4074 return ctx; in create_stream_context()
4078 gdIOCtx *ctx = ecalloc(1, sizeof(gdIOCtx)); in create_output_context() local
4080 ctx->putC = _php_image_output_putc; in create_output_context()
4081 ctx->putBuf = _php_image_output_putbuf; in create_output_context()
4082 ctx->gd_free = _php_image_output_ctxfree; in create_output_context()
4084 return ctx; in create_output_context()
4092 gdIOCtx *ctx = NULL; in _php_image_output_ctx() local
4116 ctx = create_stream_context_from_zval(to_zval); in _php_image_output_ctx()
4117 if (!ctx) { in _php_image_output_ctx()
4121 ctx = create_output_context(); in _php_image_output_ctx()
4127 gdImageJpegCtx(im, ctx, (int) quality); in _php_image_output_ctx()
4135 gdImageWebpCtx(im, ctx, (int) quality); in _php_image_output_ctx()
4143 gdImageAvifCtx(im, ctx, (int) quality, (int) speed); in _php_image_output_ctx()
4149 gdImagePngCtxEx(im, ctx, (int) quality, (int) basefilter); in _php_image_output_ctx()
4151 gdImagePngCtxEx(im, ctx, (int) quality); in _php_image_output_ctx()
4156 gdImageGifCtx(im, ctx); in _php_image_output_ctx()
4161 ctx->gd_free(ctx); in _php_image_output_ctx()