Lines Matching refs:nim

131 #define output_buf (nim->pixels)
344 prescan_quantize (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) argument
467 update_box (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, boxptr boxp) argument
603 median_cut (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize,
699 update_box (oim, nim, cquantize, b1);
700 update_box (oim, nim, cquantize, b2);
710 compute_color (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, argument
765 nim->red[icolor] = (int) ((c0total + (total >> 1)) / total);
766 nim->green[icolor] = (int) ((c1total + (total >> 1)) / total);
767 nim->blue[icolor] = (int) ((c2total + (total >> 1)) / total);
771 nim->red[icolor] = 255;
772 nim->green[icolor] = 255;
773 nim->blue[icolor] = 255;
775 nim->open[icolor] = 0;
784 select_colors (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize, int desired_colors)
819 update_box (oim, nim, cquantize, &boxlist[0]);
821 numboxes = median_cut (oim, nim, cquantize, boxlist, numboxes, desired_colors);
824 compute_color (oim, nim, cquantize, &boxlist[i], i);
825 nim->colorsTotal = numboxes;
834 nim->red[nim->colorsTotal] = gdTrueColorGetRed (oim->transparent);
835 nim->green[nim->colorsTotal] = gdTrueColorGetGreen (oim->transparent);
836 nim->blue[nim->colorsTotal] = gdTrueColorGetBlue (oim->transparent);
837 nim->alpha[nim->colorsTotal] = gdAlphaTransparent;
838 nim->open[nim->colorsTotal] = 0;
927 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize,
942 int numcolors = nim->colorsTotal;
979 x = nim->red[i];
1014 x = nim->green[i];
1048 x = nim->blue[i];
1102 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize,
1152 r = nim->red[icolor];
1153 g = nim->green[icolor];
1154 b = nim->blue[icolor];
1207 gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize,
1252 find_nearby_colors (oim, nim, cquantize, minc0, minc1, minc2, colorlist);
1253 find_best_colors (oim, nim, cquantize, minc0, minc1, minc2, numcolors,
1286 pass2_no_dither (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) argument
1334 *outptr++ = nim->colorsTotal;
1350 fill_inverse_cmap (oim, nim, cquantize, c0, c1, c2);
1365 pass2_fs_dither (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize) argument
1397 int *colormap0 = nim->red;
1398 int *colormap1 = nim->green;
1399 int *colormap2 = nim->blue;
1444 *outptr = nim->colorsTotal;
1501 fill_inverse_cmap (oim, nim, cquantize, cur0 >> C0_SHIFT,
1591 init_error_limit (gdImagePtr oim, gdImagePtr nim, my_cquantize_ptr cquantize)
1761 gdImagePtr nim; local
1762 gdImageTrueColorToPaletteBody(im, dither, colorsWanted, &nim);
1763 return nim;
1789 gdImagePtr nim; local
1791 nim = gdImageCreate(oim->sx, oim->sy);
1792 *cimP = nim;
1793 if (!nim) {
1797 nim = oim;
1803 gdImageCopy(nim, oim, 0, 0, 0, 0, oim->sx, oim->sy);
1804 *cimP = nim;
1820 nim->pixels = gdCalloc (sizeof (unsigned char *), oim->sy);
1821 if (!nim->pixels)
1826 for (i = 0; (i < nim->sy); i++)
1828 nim->pixels[i] = gdCalloc (sizeof (unsigned char *), oim->sx);
1829 if (!nim->pixels[i])
1927 init_error_limit (oim, nim, cquantize);
1928 arraysize = (size_t) ((nim->sx + 2) * (3 * sizeof (FSERROR)));
1940 prescan_quantize (oim, nim, cquantize);
1942 select_colors (oim, nim, cquantize, colorsWanted);
1946 pass2_fs_dither (oim, nim, cquantize);
1950 pass2_no_dither (oim, nim, cquantize);
2002 nim->transparent = nim->colorsTotal;
2003 nim->colorsTotal++;
2024 for (i = 0; i < nim->sy; i++)
2026 if (nim->pixels[i])
2028 gdFree (nim->pixels[i]);
2031 if (nim->pixels)
2033 gdFree (nim->pixels);
2035 nim->pixels = 0;
2037 gdImageDestroy(nim);