Преглед изворни кода

Merge pull request #1594 from glassechidna/support-grayscale

Support grayscale PNGs
Sean Taylor пре 11 година
родитељ
комит
c046db1739
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      gameplay/src/Image.cpp

+ 1 - 1
gameplay/src/Image.cpp

@@ -66,7 +66,7 @@ Image* Image::create(const char* path)
     png_set_sig_bytes(png, 8);
     png_set_sig_bytes(png, 8);
 
 
     // Read the entire image into memory.
     // Read the entire image into memory.
-    png_read_png(png, info, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND, NULL);
+    png_read_png(png, info, PNG_TRANSFORM_STRIP_16 | PNG_TRANSFORM_PACKING | PNG_TRANSFORM_EXPAND | PNG_TRANSFORM_GRAY_TO_RGB, NULL);
 
 
     Image* image = new Image();
     Image* image = new Image();
     image->_width = png_get_image_width(png, info);
     image->_width = png_get_image_width(png, info);