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
195 im = gdImageCreateTrueColor((int) width, (int) height); in gdImageCreateFromPngCtx()
197 im = gdImageCreate((int) width, (int) height); in gdImageCreateFromPngCtx()
199 if (im == NULL) { in gdImageCreateFromPngCtx()
221 if (im) { in gdImageCreateFromPngCtx()
222 gdImageDestroy(im); in gdImageCreateFromPngCtx()
244 im->alpha[i] = gdAlphaMax - (trans[i] >> 1); in gdImageCreateFromPngCtx()
334 if (!im->trueColor) { in gdImageCreateFromPngCtx()
335 im->colorsTotal = num_palette; in gdImageCreateFromPngCtx()
337 open = im->open; in gdImageCreateFromPngCtx()
339 im->red[i] = palette[i].red; in gdImageCreateFromPngCtx()
340 im->green[i] = palette[i].green; in gdImageCreateFromPngCtx()
341 im->blue[i] = palette[i].blue; in gdImageCreateFromPngCtx()
351 im->transparent = transparent; in gdImageCreateFromPngCtx()
352 im->interlace = (interlace_type == PNG_INTERLACE_ADAM7); in gdImageCreateFromPngCtx()
364 im->tpixels[h][w] = gdTrueColor (r, g, b); in gdImageCreateFromPngCtx()
384 im->tpixels[h][w] = gdTrueColorAlpha(r, g, b, a); in gdImageCreateFromPngCtx()
394 im->pixels[h][w] = idx; in gdImageCreateFromPngCtx()
400 if (!im->trueColor) { in gdImageCreateFromPngCtx()
415 return im; in gdImageCreateFromPngCtx()
418 void gdImagePngEx (gdImagePtr im, FILE * outFile, int level, int basefilter) in gdImagePngEx() argument
421 gdImagePngCtxEx(im, out, level, basefilter); in gdImagePngEx()
425 void gdImagePng (gdImagePtr im, FILE * outFile) in gdImagePng() argument
428 gdImagePngCtxEx(im, out, -1, -1); in gdImagePng()
432 void * gdImagePngPtr (gdImagePtr im, int *size) in gdImagePngPtr() argument
436 gdImagePngCtxEx(im, out, -1, -1); in gdImagePngPtr()
443 void * gdImagePngPtrEx (gdImagePtr im, int *size, int level, int basefilter) in gdImagePngPtrEx() argument
447 gdImagePngCtxEx(im, out, level, basefilter); in gdImagePngPtrEx()
453 void gdImagePngCtx (gdImagePtr im, gdIOCtx * outfile) in gdImagePngCtx() argument
455 gdImagePngCtxEx(im, outfile, -1, -1); in gdImagePngCtx()
462 void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * outfile, int level, int basefilter) in gdImagePngCtxEx() argument
465 int width = im->sx; in gdImagePngCtxEx()
466 int height = im->sy; in gdImagePngCtxEx()
467 int colors = im->colorsTotal; in gdImagePngCtxEx()
468 int *open = im->open; in gdImagePngCtxEx()
475 volatile int transparent = im->transparent; in gdImagePngCtxEx()
533 if (!im->trueColor) { in gdImagePngCtxEx()
534 if (transparent >= im->colorsTotal || (transparent >= 0 && open[transparent])) { in gdImagePngCtxEx()
544 for (i = 0; i < im->colorsTotal; ++i) { in gdImagePngCtxEx()
554 if (colors < im->colorsTotal) { in gdImagePngCtxEx()
568 interlace_type = im->interlace ? PNG_INTERLACE_ADAM7 : PNG_INTERLACE_NONE; in gdImagePngCtxEx()
570 if (im->trueColor) { in gdImagePngCtxEx()
571 if (im->saveAlphaFlag) { in gdImagePngCtxEx()
583 if (im->trueColor && !im->saveAlphaFlag && (transparent >= 0)) { in gdImagePngCtxEx()
585 trans_rgb_value.red = gdTrueColorGetRed (im->transparent); in gdImagePngCtxEx()
586 trans_rgb_value.green = gdTrueColorGetGreen (im->transparent); in gdImagePngCtxEx()
587 trans_rgb_value.blue = gdTrueColorGetBlue (im->transparent); in gdImagePngCtxEx()
591 if (!im->trueColor) { in gdImagePngCtxEx()
602 for (i = 0; (i < im->colorsTotal); i++) { in gdImagePngCtxEx()
603 if ((!im->open[i]) && (im->alpha[i] != gdAlphaOpaque)) { in gdImagePngCtxEx()
609 for (i = 0; (i < im->colorsTotal); i++) { in gdImagePngCtxEx()
610 trans_values[i] = 255 - ((im->alpha[i] << 1) + (im->alpha[i] >> 6)); in gdImagePngCtxEx()
624 for (i = 0; i < im->colorsTotal; i++) { in gdImagePngCtxEx()
625 if (!im->open[i]) { in gdImagePngCtxEx()
626 if (im->alpha[i] != gdAlphaOpaque) { in gdImagePngCtxEx()
628 trans_values[j] = 255 - ((im->alpha[i] << 1) + (im->alpha[i] >> 6)); in gdImagePngCtxEx()
640 if (!im->trueColor) { in gdImagePngCtxEx()
642 for (i = 0; i < im->colorsTotal; ++i) { in gdImagePngCtxEx()
647 palette[mapping[i]].red = im->red[i]; in gdImagePngCtxEx()
648 palette[mapping[i]].green = im->green[i]; in gdImagePngCtxEx()
649 palette[mapping[i]].blue = im->blue[i]; in gdImagePngCtxEx()
653 palette[i].red = im->red[i]; in gdImagePngCtxEx()
654 palette[i].green = im->green[i]; in gdImagePngCtxEx()
655 palette[i].blue = im->blue[i]; in gdImagePngCtxEx()
675 if (im->trueColor) { in gdImagePngCtxEx()
677 int channels = im->saveAlphaFlag ? 4 : 3; in gdImagePngCtxEx()
681 int **ptpixels = im->tpixels; in gdImagePngCtxEx()
686 int saveAlphaFlag = im->saveAlphaFlag; in gdImagePngCtxEx()
733 row_pointers[j][i] = mapping[im->pixels[j][i]]; in gdImagePngCtxEx()
746 png_write_image(png_ptr, im->pixels); in gdImagePngCtxEx()