Lines Matching refs:nim

117 #define output_buf (nim->pixels)
316 prescan_quantize (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) in prescan_quantize() argument
418 update_box (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, boxptr boxp) in update_box() argument
543 median_cut (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in median_cut() argument
634 update_box (oim, nim, cquantize, b1); in median_cut()
635 update_box (oim, nim, cquantize, b2); in median_cut()
643 compute_color (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in compute_color() argument
688 nim->red[icolor] = (int) ((c0total + (total >> 1)) / total); in compute_color()
689 nim->green[icolor] = (int) ((c1total + (total >> 1)) / total); in compute_color()
690 nim->blue[icolor] = (int) ((c2total + (total >> 1)) / total); in compute_color()
694 nim->red[icolor] = 255; in compute_color()
695 nim->green[icolor] = 255; in compute_color()
696 nim->blue[icolor] = 255; in compute_color()
698 nim->open[icolor] = 0; in compute_color()
703 select_colors (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, int desired_colors) in select_colors() argument
721 update_box (oim, nim, cquantize, &boxlist[0]); in select_colors()
723 numboxes = median_cut (oim, nim, cquantize, boxlist, numboxes, desired_colors); in select_colors()
726 compute_color (oim, nim, cquantize, &boxlist[i], i); in select_colors()
727 nim->colorsTotal = numboxes; in select_colors()
736 nim->red[nim->colorsTotal] = gdTrueColorGetRed (oim->transparent); in select_colors()
737 nim->green[nim->colorsTotal] = gdTrueColorGetGreen (oim->transparent); in select_colors()
738 nim->blue[nim->colorsTotal] = gdTrueColorGetBlue (oim->transparent); in select_colors()
739 nim->alpha[nim->colorsTotal] = gdAlphaTransparent; in select_colors()
740 nim->open[nim->colorsTotal] = 0; in select_colors()
825 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in find_nearby_colors() argument
836 int numcolors = nim->colorsTotal; in find_nearby_colors()
869 x = nim->red[i]; in find_nearby_colors()
900 x = nim->green[i]; in find_nearby_colors()
930 x = nim->blue[i]; in find_nearby_colors()
980 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in find_best_colors() argument
1022 r = nim->red[icolor]; in find_best_colors()
1023 g = nim->green[icolor]; in find_best_colors()
1024 b = nim->blue[icolor]; in find_best_colors()
1073 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, in fill_inverse_cmap() argument
1107 find_nearby_colors (oim, nim, cquantize, minc0, minc1, minc2, colorlist); in fill_inverse_cmap()
1108 find_best_colors (oim, nim, cquantize, minc0, minc1, minc2, numcolors, in fill_inverse_cmap()
1135 pass2_no_dither (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) in pass2_no_dither() argument
1169 *outptr++ = nim->colorsTotal; in pass2_no_dither()
1181 fill_inverse_cmap (oim, nim, cquantize, c0, c1, c2); in pass2_no_dither()
1190 pass2_fs_dither (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) in pass2_fs_dither() argument
1206 int *colormap0 = nim->red; in pass2_fs_dither()
1207 int *colormap1 = nim->green; in pass2_fs_dither()
1208 int *colormap2 = nim->blue; in pass2_fs_dither()
1246 *outptr = nim->colorsTotal; in pass2_fs_dither()
1290 fill_inverse_cmap (oim, nim, cquantize, cur0 >> C0_SHIFT, in pass2_fs_dither()
1372 init_error_limit (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) in init_error_limit() argument
1433 gdImagePtr nim; in gdImageCreatePaletteFromTrueColor() local
1434 if (TRUE == gdImageTrueColorToPaletteBody(im, dither, colorsWanted, &nim)) { in gdImageCreatePaletteFromTrueColor()
1435 return nim; in gdImageCreatePaletteFromTrueColor()
1470 gdImagePtr nim; in gdImageTrueColorToPaletteBody() local
1472 nim = gdImageCreate(oim->sx, oim->sy); in gdImageTrueColorToPaletteBody()
1473 *cimP = nim; in gdImageTrueColorToPaletteBody()
1474 if (!nim) { in gdImageTrueColorToPaletteBody()
1478 nim = oim; in gdImageTrueColorToPaletteBody()
1484 gdImageCopy(nim, oim, 0, 0, 0, 0, oim->sx, oim->sy); in gdImageTrueColorToPaletteBody()
1485 *cimP = nim; in gdImageTrueColorToPaletteBody()
1501 nim->pixels = gdCalloc (oim->sy, sizeof (unsigned char *)); in gdImageTrueColorToPaletteBody()
1502 if (!nim->pixels) in gdImageTrueColorToPaletteBody()
1507 for (i = 0; (i < nim->sy); i++) in gdImageTrueColorToPaletteBody()
1509 nim->pixels[i] = gdCalloc (oim->sx, sizeof (unsigned char *)); in gdImageTrueColorToPaletteBody()
1510 if (!nim->pixels[i]) in gdImageTrueColorToPaletteBody()
1540 init_error_limit (oim, nim, cquantize); in gdImageTrueColorToPaletteBody()
1541 arraysize = (size_t) ((nim->sx + 2) * (3 * sizeof (FSERROR))); in gdImageTrueColorToPaletteBody()
1553 prescan_quantize (oim, nim, cquantize); in gdImageTrueColorToPaletteBody()
1555 select_colors (oim, nim, cquantize, colorsWanted); in gdImageTrueColorToPaletteBody()
1559 pass2_fs_dither (oim, nim, cquantize); in gdImageTrueColorToPaletteBody()
1563 pass2_no_dither (oim, nim, cquantize); in gdImageTrueColorToPaletteBody()
1615 nim->transparent = nim->colorsTotal; in gdImageTrueColorToPaletteBody()
1616 nim->colorsTotal++; in gdImageTrueColorToPaletteBody()
1634 for (i = 0; i < nim->sy; i++) in gdImageTrueColorToPaletteBody()
1636 if (nim->pixels[i]) in gdImageTrueColorToPaletteBody()
1638 gdFree (nim->pixels[i]); in gdImageTrueColorToPaletteBody()
1641 if (nim->pixels) in gdImageTrueColorToPaletteBody()
1643 gdFree (nim->pixels); in gdImageTrueColorToPaletteBody()
1645 nim->pixels = 0; in gdImageTrueColorToPaletteBody()
1647 gdImageDestroy(nim); in gdImageTrueColorToPaletteBody()