diff --git a/main/lib/image/gb.image.h b/main/lib/image/gb.image.h index 7fe1735bc..caf2095af 100644 --- a/main/lib/image/gb.image.h +++ b/main/lib/image/gb.image.h @@ -158,6 +158,8 @@ typedef const char *(*FormatToString)(int format); // Return the luminance of a color int (*GetLuminance)(GB_COLOR col); + // Invert an image, eventually preserving the color hue. + void (*Invert)(GB_IMG *img, bool keep_hue); } IMAGE_INTERFACE; diff --git a/main/lib/image/main.c b/main/lib/image/main.c index 597924514..6074a4a11 100644 --- a/main/lib/image/main.c +++ b/main/lib/image/main.c @@ -70,6 +70,7 @@ void *GB_IMAGE_1[] EXPORT = (void *)COLOR_darker, (void *)IMAGE_format_to_string, (void *)COLOR_get_luminance, + (void *)IMAGE_invert, NULL };