We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 789fac3 commit c67cbbaCopy full SHA for c67cbba
tools/nitrogfx/convert_png.c
@@ -109,6 +109,7 @@ void ReadPng(char *path, struct Image *image) {
109
// Don't read the palette because it's not needed for now.
110
image->hasPalette = (color_type & PNG_COLOR_MASK_COLOR) != 0;
111
image->hasTransparency = color_type == PNG_COLOR_TYPE_PALETTE || ((color_type & PNG_COLOR_MASK_ALPHA) != 0);
112
+ image->pixelsAreRGB = (color_type & PNG_COLOR_MASK_COLOR) != 0 && (color_type & PNG_COLOR_MASK_PALETTE) == 0;
113
114
image->width = png_get_image_width(png_ptr, info_ptr);
115
image->height = png_get_image_height(png_ptr, info_ptr);
0 commit comments