Lines Matching refs:im
95 gdImagePtr im; in gdImageCreateFromPng() local
97 im = gdImageCreateFromPngCtx(in); in gdImageCreateFromPng()
100 return im; in gdImageCreateFromPng()
105 gdImagePtr im; in gdImageCreateFromPngPtr() local
107 im = gdImageCreateFromPngCtx(in); in gdImageCreateFromPngPtr()
109 return im; in gdImageCreateFromPngPtr()
132 gdImagePtr im = NULL; in gdImageCreateFromPngCtx() local
196 im = gdImageCreateTrueColor((int) width, (int) height); in gdImageCreateFromPngCtx()
198 im = gdImageCreate((int) width, (int) height); in gdImageCreateFromPngCtx()
200 if (im == NULL) { in gdImageCreateFromPngCtx()
222 if (im) { in gdImageCreateFromPngCtx()
223 gdImageDestroy(im); in gdImageCreateFromPngCtx()
245 im->alpha[i] = gdAlphaMax - (trans[i] >> 1); in gdImageCreateFromPngCtx()
335 if (!im->trueColor) { in gdImageCreateFromPngCtx()
336 im->colorsTotal = num_palette; in gdImageCreateFromPngCtx()
338 open = im->open; in gdImageCreateFromPngCtx()
340 im->red[i] = palette[i].red; in gdImageCreateFromPngCtx()
341 im->green[i] = palette[i].green; in gdImageCreateFromPngCtx()
342 im->blue[i] = palette[i].blue; in gdImageCreateFromPngCtx()
353 im->transparent = transparent; in gdImageCreateFromPngCtx()
354 im->interlace = (interlace_type == PNG_INTERLACE_ADAM7); in gdImageCreateFromPngCtx()
366 im->tpixels[h][w] = gdTrueColor (r, g, b); in gdImageCreateFromPngCtx()
386 im->tpixels[h][w] = gdTrueColorAlpha(r, g, b, a); in gdImageCreateFromPngCtx()
396 im->pixels[h][w] = idx; in gdImageCreateFromPngCtx()
402 if (!im->trueColor) { in gdImageCreateFromPngCtx()
417 return im; in gdImageCreateFromPngCtx()
420 void gdImagePngEx (gdImagePtr im, FILE * outFile, int level, int basefilter) in gdImagePngEx() argument
423 gdImagePngCtxEx(im, out, level, basefilter); in gdImagePngEx()
427 void gdImagePng (gdImagePtr im, FILE * outFile) in gdImagePng() argument
430 gdImagePngCtxEx(im, out, -1, -1); in gdImagePng()
434 void * gdImagePngPtr (gdImagePtr im, int *size) in gdImagePngPtr() argument
438 gdImagePngCtxEx(im, out, -1, -1); in gdImagePngPtr()
445 void * gdImagePngPtrEx (gdImagePtr im, int *size, int level, int basefilter) in gdImagePngPtrEx() argument
449 gdImagePngCtxEx(im, out, level, basefilter); in gdImagePngPtrEx()
455 void gdImagePngCtx (gdImagePtr im, gdIOCtx * outfile) in gdImagePngCtx() argument
457 gdImagePngCtxEx(im, outfile, -1, -1); in gdImagePngCtx()
464 void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * outfile, int level, int basefilter) in gdImagePngCtxEx() argument
467 int width = im->sx; in gdImagePngCtxEx()
468 int height = im->sy; in gdImagePngCtxEx()
469 int colors = im->colorsTotal; in gdImagePngCtxEx()
470 int *open = im->open; in gdImagePngCtxEx()
477 volatile int transparent = im->transparent; in gdImagePngCtxEx()
535 if (!im->trueColor) { in gdImagePngCtxEx()
536 if (transparent >= im->colorsTotal || (transparent >= 0 && open[transparent])) { in gdImagePngCtxEx()
546 for (i = 0; i < im->colorsTotal; ++i) { in gdImagePngCtxEx()
556 if (colors < im->colorsTotal) { in gdImagePngCtxEx()
570 interlace_type = im->interlace ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE; in gdImagePngCtxEx()
572 if (im->trueColor) { in gdImagePngCtxEx()
573 if (im->saveAlphaFlag) { in gdImagePngCtxEx()
585 if (im->trueColor && !im->saveAlphaFlag && (transparent >= 0)) { in gdImagePngCtxEx()
587 trans_rgb_value.red = gdTrueColorGetRed (im->transparent); in gdImagePngCtxEx()
588 trans_rgb_value.green = gdTrueColorGetGreen (im->transparent); in gdImagePngCtxEx()
589 trans_rgb_value.blue = gdTrueColorGetBlue (im->transparent); in gdImagePngCtxEx()
593 if (!im->trueColor) { in gdImagePngCtxEx()
604 for (i = 0; (i < im->colorsTotal); i++) { in gdImagePngCtxEx()
605 if ((!im->open[i]) && (im->alpha[i] != gdAlphaOpaque)) { in gdImagePngCtxEx()
611 for (i = 0; (i < im->colorsTotal); i++) { in gdImagePngCtxEx()
612 trans_values[i] = 255 - ((im->alpha[i] << 1) + (im->alpha[i] >> 6)); in gdImagePngCtxEx()
626 for (i = 0; i < im->colorsTotal; i++) { in gdImagePngCtxEx()
627 if (!im->open[i]) { in gdImagePngCtxEx()
628 if (im->alpha[i] != gdAlphaOpaque) { in gdImagePngCtxEx()
630 trans_values[j] = 255 - ((im->alpha[i] << 1) + (im->alpha[i] >> 6)); in gdImagePngCtxEx()
642 if (!im->trueColor) { in gdImagePngCtxEx()
644 for (i = 0; i < im->colorsTotal; ++i) { in gdImagePngCtxEx()
649 palette[mapping[i]].red = im->red[i]; in gdImagePngCtxEx()
650 palette[mapping[i]].green = im->green[i]; in gdImagePngCtxEx()
651 palette[mapping[i]].blue = im->blue[i]; in gdImagePngCtxEx()
655 palette[i].red = im->red[i]; in gdImagePngCtxEx()
656 palette[i].green = im->green[i]; in gdImagePngCtxEx()
657 palette[i].blue = im->blue[i]; in gdImagePngCtxEx()
677 if (im->trueColor) { in gdImagePngCtxEx()
679 int channels = im->saveAlphaFlag ? 4 : 3; in gdImagePngCtxEx()
683 int **ptpixels = im->tpixels; in gdImagePngCtxEx()
688 int saveAlphaFlag = im->saveAlphaFlag; in gdImagePngCtxEx()
735 row_pointers[j][i] = mapping[im->pixels[j][i]]; in gdImagePngCtxEx()
748 png_write_image(png_ptr, im->pixels); in gdImagePngCtxEx()