Actually respect numColors lol

This commit is contained in:
Surma
2018-07-31 12:46:32 +01:00
parent e8c0ddfc7f
commit b3f3ecbf28
2 changed files with 1 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ void quantize(uint8_t* image_buffer, int image_width, int image_height, int num_
int size = image_width * image_height;
attr = liq_attr_create();
image = liq_image_create_rgba(attr, image_buffer, image_width, image_height, 0);
liq_set_max_colors(attr, 16);
liq_set_max_colors(attr, num_colors);
liq_image_quantize(image, attr, &res);
liq_set_dithering_level(res, dithering);
uint8_t* image8bit = (uint8_t*) malloc(size);

Binary file not shown.