From 7a7ce6a7bf5634006c7fbf872267fccb1da36240 Mon Sep 17 00:00:00 2001 From: Spoike Date: Fri, 14 Apr 2006 02:05:39 +0000 Subject: [PATCH] don't fail to load 16bits-per-plane rgb png images. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2204 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/client/image.c b/engine/client/image.c index bbd0f0913..370233c5f 100644 --- a/engine/client/image.c +++ b/engine/client/image.c @@ -635,7 +635,7 @@ error: if (png_get_valid( png, pnginfo, PNG_INFO_tRNS )) png_set_tRNS_to_alpha(png); - if (/*bitdepth == 8 && */colortype == PNG_COLOR_TYPE_RGB) + if (bitdepth >= 8 && colortype == PNG_COLOR_TYPE_RGB) png_set_filler(png, 255, PNG_FILLER_AFTER); if (colortype == PNG_COLOR_TYPE_GRAY || colortype == PNG_COLOR_TYPE_GRAY_ALPHA) {