Improved color palette error in image.c
This commit is contained in:
@@ -63,7 +63,7 @@ const char *image_init(image_t *self, const char *filename) {
|
|||||||
int a = p[3];
|
int a = p[3];
|
||||||
int idx = palette_colorIdx(r, g, b);
|
int idx = palette_colorIdx(r, g, b);
|
||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
errmsg = "color palette exhausted: use fewer colors";
|
errmsg = "color palette exhausted: use fewer unique colors";
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
self->data[i] = (a >= 127) ? idx : 0;
|
self->data[i] = (a >= 127) ? idx : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user