Lines Matching refs:ncolors
173 unsigned long ncolors; /* number of colors to be defined */ in readwrite_map() local
186 ncolors = colormap->red_max; in readwrite_map()
187 if (colormap->green_max > ncolors) in readwrite_map()
188 ncolors = colormap->green_max; in readwrite_map()
189 if (colormap->blue_max > ncolors) in readwrite_map()
190 ncolors = colormap->blue_max; in readwrite_map()
191 ncolors++; in readwrite_map()
196 ncolors = colormap->red_max * colormap->red_mult + in readwrite_map()
201 if (ncolors <= 1 || (int) ncolors > vinfo->colormap_size) return 0; in readwrite_map()
226 vinfo->colormap_size, ncolors)) == 0) { in readwrite_map()
233 if (!contiguous(pixels, npixels, ncolors, delta, &first_index, &remainder)) in readwrite_map()
246 for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) in readwrite_map()
261 for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) in readwrite_map()
274 for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) in readwrite_map()
287 for (n=colormap->base_pixel, i=0; i < ncolors; i++, n += delta) in readwrite_map()
304 for (n=0, i=0; i < ncolors; i++, n += delta) in readwrite_map()
326 &(pixels[first_index + ncolors]), remainder, in readwrite_map()
376 contiguous(unsigned long pixels[], int npixels, int ncolors, in contiguous() argument
390 if (npixels == ncolors) { in contiguous()
395 while (count < ncolors && ncolors - count <= *rem) in contiguous()
406 if (count != ncolors) in contiguous()