From 0c2849eea3530797d26146ad076290b410b53342 Mon Sep 17 00:00:00 2001 From: natural-law Date: Mon, 13 Sep 2010 07:00:08 +0000 Subject: [PATCH] issue #139 Debug --- cocos2dx/platform/uphone/CCXUIImage_uphone.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos2dx/platform/uphone/CCXUIImage_uphone.cpp b/cocos2dx/platform/uphone/CCXUIImage_uphone.cpp index e02751ce12..c7ed49ae3c 100644 --- a/cocos2dx/platform/uphone/CCXUIImage_uphone.cpp +++ b/cocos2dx/platform/uphone/CCXUIImage_uphone.cpp @@ -334,7 +334,7 @@ bool UIImage::loadPng(const char* strFileName) png_set_sig_bytes(png_ptr, 8); // read the data of the file - png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_EXPAND, 0); + png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_EXPAND | PNG_TRANSFORM_GRAY_TO_RGB, 0); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bitDepth, &colorType, &interlaceType, NULL, NULL); @@ -454,7 +454,7 @@ bool UIImage::loadPngFromStream(unsigned char *data, int nLength) png_set_read_fn(png_ptr, &imageSource, pngReadCallback); // read the data of the file - png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_EXPAND, 0); + png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_EXPAND | PNG_TRANSFORM_GRAY_TO_RGB, 0); png_get_IHDR(png_ptr, info_ptr, &width, &height, &bitDepth, &colorType, &interlaceType, NULL, NULL);