Skip to content

Commit 89fc73b

Browse files
committed
png loader: don't convert grayscale images to rgb
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
1 parent 1feabed commit 89fc73b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nbl/asset/interchange/CImageLoaderPNG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ asset::SAssetBundle CImageLoaderPng::loadAsset(system::IFile* _file, const asset
178178

179179
if (ColorType == PNG_COLOR_TYPE_PALETTE)
180180
png_set_palette_to_rgb(png_ptr);
181-
else if (ColorType == PNG_COLOR_TYPE_GRAY || ColorType == PNG_COLOR_TYPE_GRAY_ALPHA)
181+
else if (ColorType == PNG_COLOR_TYPE_GRAY_ALPHA)
182182
png_set_gray_to_rgb(png_ptr);
183183

184184
// Convert low bit colors to 8 bit colors

0 commit comments

Comments
 (0)