Lines Matching refs:ncolors
116 sixel_dither_create(int ncolors) in sixel_dither_create() argument
123 if (ncolors > SIXEL_PALETTE_MAX) { in sixel_dither_create()
124 ncolors = 256; in sixel_dither_create()
125 } else if (ncolors < 2) { in sixel_dither_create()
126 ncolors = 2; in sixel_dither_create()
129 datasize = ncolors * 3; in sixel_dither_create()
139 dither->reqcolors = ncolors; in sixel_dither_create()
140 dither->ncolors = ncolors; in sixel_dither_create()
185 int ncolors; in sixel_dither_get() local
191 ncolors = 2; in sixel_dither_get()
196 ncolors = 2; in sixel_dither_get()
201 ncolors = 16; in sixel_dither_get()
206 ncolors = 256; in sixel_dither_get()
214 dither = sixel_dither_create(ncolors); in sixel_dither_get()
232 dither->reqcolors, &dither->ncolors, in sixel_dither_initialize()
240 memcpy(dither->palette, buf, dither->ncolors * depth); in sixel_dither_initialize()
244 if (dither->origcolors <= dither->ncolors) { in sixel_dither_initialize()
262 return dither->ncolors; in sixel_dither_get_num_of_palette_colors()
315 dither->ncolors, in sixel_apply_palette()