Lines Matching refs:im

101 	gdImagePtr im;  in gdImageCreateFromPng()  local
103 im = gdImageCreateFromPngCtx(in); in gdImageCreateFromPng()
106 return im; in gdImageCreateFromPng()
111 gdImagePtr im; in gdImageCreateFromPngPtr() local
113 im = gdImageCreateFromPngCtx(in); in gdImageCreateFromPngPtr()
115 return im; in gdImageCreateFromPngPtr()
138 gdImagePtr im = NULL; in gdImageCreateFromPngCtx() local
202 im = gdImageCreateTrueColor((int) width, (int) height); in gdImageCreateFromPngCtx()
204 im = gdImageCreate((int) width, (int) height); in gdImageCreateFromPngCtx()
206 if (im == NULL) { in gdImageCreateFromPngCtx()
228 if (im) { in gdImageCreateFromPngCtx()
229 gdImageDestroy(im); in gdImageCreateFromPngCtx()
241 im->res_x = DPM2DPI(res_x); in gdImageCreateFromPngCtx()
242 im->res_y = DPM2DPI(res_y); in gdImageCreateFromPngCtx()
265 im->alpha[i] = gdAlphaMax - (trans[i] >> 1); in gdImageCreateFromPngCtx()
360 if (!im->trueColor) { in gdImageCreateFromPngCtx()
361 im->colorsTotal = num_palette; in gdImageCreateFromPngCtx()
363 open = im->open; in gdImageCreateFromPngCtx()
365 im->red[i] = palette[i].red; in gdImageCreateFromPngCtx()
366 im->green[i] = palette[i].green; in gdImageCreateFromPngCtx()
367 im->blue[i] = palette[i].blue; in gdImageCreateFromPngCtx()
378 im->transparent = transparent; in gdImageCreateFromPngCtx()
379 im->interlace = (interlace_type == PNG_INTERLACE_ADAM7); in gdImageCreateFromPngCtx()
391 im->tpixels[h][w] = gdTrueColor (r, g, b); in gdImageCreateFromPngCtx()
411 im->tpixels[h][w] = gdTrueColorAlpha(r, g, b, a); in gdImageCreateFromPngCtx()
421 im->pixels[h][w] = idx; in gdImageCreateFromPngCtx()
427 if (!im->trueColor) { in gdImageCreateFromPngCtx()
442 return im; in gdImageCreateFromPngCtx()
445 void gdImagePngEx (gdImagePtr im, FILE * outFile, int level, int basefilter) in gdImagePngEx() argument
448 gdImagePngCtxEx(im, out, level, basefilter); in gdImagePngEx()
452 void gdImagePng (gdImagePtr im, FILE * outFile) in gdImagePng() argument
455 gdImagePngCtxEx(im, out, -1, -1); in gdImagePng()
459 void * gdImagePngPtr (gdImagePtr im, int *size) in gdImagePngPtr() argument
463 gdImagePngCtxEx(im, out, -1, -1); in gdImagePngPtr()
470 void * gdImagePngPtrEx (gdImagePtr im, int *size, int level, int basefilter) in gdImagePngPtrEx() argument
474 gdImagePngCtxEx(im, out, level, basefilter); in gdImagePngPtrEx()
480 void gdImagePngCtx (gdImagePtr im, gdIOCtx * outfile) in gdImagePngCtx() argument
482 gdImagePngCtxEx(im, outfile, -1, -1); in gdImagePngCtx()
489 void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * outfile, int level, int basefilter) in gdImagePngCtxEx() argument
492 int width = im->sx; in gdImagePngCtxEx()
493 int height = im->sy; in gdImagePngCtxEx()
494 int colors = im->colorsTotal; in gdImagePngCtxEx()
495 int *open = im->open; in gdImagePngCtxEx()
502 volatile int transparent = im->transparent; in gdImagePngCtxEx()
556 png_set_pHYs(png_ptr, info_ptr, DPI2DPM(im->res_x), DPI2DPM(im->res_y), in gdImagePngCtxEx()
566 if (!im->trueColor) { in gdImagePngCtxEx()
567 if (transparent >= im->colorsTotal || (transparent >= 0 && open[transparent])) { in gdImagePngCtxEx()
577 for (i = 0; i < im->colorsTotal; ++i) { in gdImagePngCtxEx()
587 if (colors < im->colorsTotal) { in gdImagePngCtxEx()
601 interlace_type = im->interlace ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE; in gdImagePngCtxEx()
603 if (im->trueColor) { in gdImagePngCtxEx()
604 if (im->saveAlphaFlag) { in gdImagePngCtxEx()
616 if (im->trueColor && !im->saveAlphaFlag && (transparent >= 0)) { in gdImagePngCtxEx()
618 trans_rgb_value.red = gdTrueColorGetRed (im->transparent); in gdImagePngCtxEx()
619 trans_rgb_value.green = gdTrueColorGetGreen (im->transparent); in gdImagePngCtxEx()
620 trans_rgb_value.blue = gdTrueColorGetBlue (im->transparent); in gdImagePngCtxEx()
624 if (!im->trueColor) { in gdImagePngCtxEx()
635 for (i = 0; (i < im->colorsTotal); i++) { in gdImagePngCtxEx()
636 if ((!im->open[i]) && (im->alpha[i] != gdAlphaOpaque)) { in gdImagePngCtxEx()
642 for (i = 0; (i < im->colorsTotal); i++) { in gdImagePngCtxEx()
643 trans_values[i] = 255 - ((im->alpha[i] << 1) + (im->alpha[i] >> 6)); in gdImagePngCtxEx()
657 for (i = 0; i < im->colorsTotal; i++) { in gdImagePngCtxEx()
658 if (!im->open[i]) { in gdImagePngCtxEx()
659 if (im->alpha[i] != gdAlphaOpaque) { in gdImagePngCtxEx()
661 trans_values[j] = 255 - ((im->alpha[i] << 1) + (im->alpha[i] >> 6)); in gdImagePngCtxEx()
673 if (!im->trueColor) { in gdImagePngCtxEx()
675 for (i = 0; i < im->colorsTotal; ++i) { in gdImagePngCtxEx()
680 palette[mapping[i]].red = im->red[i]; in gdImagePngCtxEx()
681 palette[mapping[i]].green = im->green[i]; in gdImagePngCtxEx()
682 palette[mapping[i]].blue = im->blue[i]; in gdImagePngCtxEx()
686 palette[i].red = im->red[i]; in gdImagePngCtxEx()
687 palette[i].green = im->green[i]; in gdImagePngCtxEx()
688 palette[i].blue = im->blue[i]; in gdImagePngCtxEx()
708 if (im->trueColor) { in gdImagePngCtxEx()
710 int channels = im->saveAlphaFlag ? 4 : 3; in gdImagePngCtxEx()
714 int **ptpixels = im->tpixels; in gdImagePngCtxEx()
719 int saveAlphaFlag = im->saveAlphaFlag; in gdImagePngCtxEx()
761 row_pointers[j][i] = mapping[im->pixels[j][i]]; in gdImagePngCtxEx()
774 png_write_image(png_ptr, im->pixels); in gdImagePngCtxEx()