Lines Matching refs:im

96 	gdImagePtr im;  in gdImageCreateFromPng()  local
98 im = gdImageCreateFromPngCtx(in); in gdImageCreateFromPng()
101 return im; in gdImageCreateFromPng()
106 gdImagePtr im; in gdImageCreateFromPngPtr() local
108 im = gdImageCreateFromPngCtx(in); in gdImageCreateFromPngPtr()
110 return im; in gdImageCreateFromPngPtr()
133 gdImagePtr im = NULL; in gdImageCreateFromPngCtx() local
197 im = gdImageCreateTrueColor((int) width, (int) height); in gdImageCreateFromPngCtx()
199 im = gdImageCreate((int) width, (int) height); in gdImageCreateFromPngCtx()
201 if (im == NULL) { in gdImageCreateFromPngCtx()
223 if (im) { in gdImageCreateFromPngCtx()
224 gdImageDestroy(im); in gdImageCreateFromPngCtx()
236 im->res_x = DPM2DPI(res_x); in gdImageCreateFromPngCtx()
237 im->res_y = DPM2DPI(res_y); in gdImageCreateFromPngCtx()
260 im->alpha[i] = gdAlphaMax - (trans[i] >> 1); in gdImageCreateFromPngCtx()
350 if (!im->trueColor) { in gdImageCreateFromPngCtx()
351 im->colorsTotal = num_palette; in gdImageCreateFromPngCtx()
353 open = im->open; in gdImageCreateFromPngCtx()
355 im->red[i] = palette[i].red; in gdImageCreateFromPngCtx()
356 im->green[i] = palette[i].green; in gdImageCreateFromPngCtx()
357 im->blue[i] = palette[i].blue; in gdImageCreateFromPngCtx()
368 im->transparent = transparent; in gdImageCreateFromPngCtx()
369 im->interlace = (interlace_type == PNG_INTERLACE_ADAM7); in gdImageCreateFromPngCtx()
381 im->tpixels[h][w] = gdTrueColor (r, g, b); in gdImageCreateFromPngCtx()
401 im->tpixels[h][w] = gdTrueColorAlpha(r, g, b, a); in gdImageCreateFromPngCtx()
411 im->pixels[h][w] = idx; in gdImageCreateFromPngCtx()
417 if (!im->trueColor) { in gdImageCreateFromPngCtx()
432 return im; in gdImageCreateFromPngCtx()
435 void gdImagePngEx (gdImagePtr im, FILE * outFile, int level, int basefilter) in gdImagePngEx() argument
438 gdImagePngCtxEx(im, out, level, basefilter); in gdImagePngEx()
442 void gdImagePng (gdImagePtr im, FILE * outFile) in gdImagePng() argument
445 gdImagePngCtxEx(im, out, -1, -1); in gdImagePng()
449 void * gdImagePngPtr (gdImagePtr im, int *size) in gdImagePngPtr() argument
453 gdImagePngCtxEx(im, out, -1, -1); in gdImagePngPtr()
460 void * gdImagePngPtrEx (gdImagePtr im, int *size, int level, int basefilter) in gdImagePngPtrEx() argument
464 gdImagePngCtxEx(im, out, level, basefilter); in gdImagePngPtrEx()
470 void gdImagePngCtx (gdImagePtr im, gdIOCtx * outfile) in gdImagePngCtx() argument
472 gdImagePngCtxEx(im, outfile, -1, -1); in gdImagePngCtx()
479 void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * outfile, int level, int basefilter) in gdImagePngCtxEx() argument
482 int width = im->sx; in gdImagePngCtxEx()
483 int height = im->sy; in gdImagePngCtxEx()
484 int colors = im->colorsTotal; in gdImagePngCtxEx()
485 int *open = im->open; in gdImagePngCtxEx()
492 volatile int transparent = im->transparent; in gdImagePngCtxEx()
546 png_set_pHYs(png_ptr, info_ptr, DPI2DPM(im->res_x), DPI2DPM(im->res_y), in gdImagePngCtxEx()
556 if (!im->trueColor) { in gdImagePngCtxEx()
557 if (transparent >= im->colorsTotal || (transparent >= 0 && open[transparent])) { in gdImagePngCtxEx()
567 for (i = 0; i < im->colorsTotal; ++i) { in gdImagePngCtxEx()
577 if (colors < im->colorsTotal) { in gdImagePngCtxEx()
591 interlace_type = im->interlace ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE; in gdImagePngCtxEx()
593 if (im->trueColor) { in gdImagePngCtxEx()
594 if (im->saveAlphaFlag) { in gdImagePngCtxEx()
606 if (im->trueColor && !im->saveAlphaFlag && (transparent >= 0)) { in gdImagePngCtxEx()
608 trans_rgb_value.red = gdTrueColorGetRed (im->transparent); in gdImagePngCtxEx()
609 trans_rgb_value.green = gdTrueColorGetGreen (im->transparent); in gdImagePngCtxEx()
610 trans_rgb_value.blue = gdTrueColorGetBlue (im->transparent); in gdImagePngCtxEx()
614 if (!im->trueColor) { in gdImagePngCtxEx()
625 for (i = 0; (i < im->colorsTotal); i++) { in gdImagePngCtxEx()
626 if ((!im->open[i]) && (im->alpha[i] != gdAlphaOpaque)) { in gdImagePngCtxEx()
632 for (i = 0; (i < im->colorsTotal); i++) { in gdImagePngCtxEx()
633 trans_values[i] = 255 - ((im->alpha[i] << 1) + (im->alpha[i] >> 6)); in gdImagePngCtxEx()
647 for (i = 0; i < im->colorsTotal; i++) { in gdImagePngCtxEx()
648 if (!im->open[i]) { in gdImagePngCtxEx()
649 if (im->alpha[i] != gdAlphaOpaque) { in gdImagePngCtxEx()
651 trans_values[j] = 255 - ((im->alpha[i] << 1) + (im->alpha[i] >> 6)); in gdImagePngCtxEx()
663 if (!im->trueColor) { in gdImagePngCtxEx()
665 for (i = 0; i < im->colorsTotal; ++i) { in gdImagePngCtxEx()
670 palette[mapping[i]].red = im->red[i]; in gdImagePngCtxEx()
671 palette[mapping[i]].green = im->green[i]; in gdImagePngCtxEx()
672 palette[mapping[i]].blue = im->blue[i]; in gdImagePngCtxEx()
676 palette[i].red = im->red[i]; in gdImagePngCtxEx()
677 palette[i].green = im->green[i]; in gdImagePngCtxEx()
678 palette[i].blue = im->blue[i]; in gdImagePngCtxEx()
698 if (im->trueColor) { in gdImagePngCtxEx()
700 int channels = im->saveAlphaFlag ? 4 : 3; in gdImagePngCtxEx()
704 int **ptpixels = im->tpixels; in gdImagePngCtxEx()
709 int saveAlphaFlag = im->saveAlphaFlag; in gdImagePngCtxEx()
756 row_pointers[j][i] = mapping[im->pixels[j][i]]; in gdImagePngCtxEx()
769 png_write_image(png_ptr, im->pixels); in gdImagePngCtxEx()