summaryrefslogtreecommitdiffstats
path: root/TextureLoader/src/Image.cpp
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-06 05:12:45 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-06 05:12:45 +0000
commit624b8be46f38a695f6f9e4c7ea07cd8f370c04b4 (patch)
tree24e9e62b8e0c2c2cae1c0026ef36010fd09214a1 /TextureLoader/src/Image.cpp
parentCMake: Added grouping of projects in VS solution (diff)
downloadDiligentTools-624b8be46f38a695f6f9e4c7ea07cd8f370c04b4.tar.gz
DiligentTools-624b8be46f38a695f6f9e4c7ea07cd8f370c04b4.zip
Updated cmake files; fixed build warnings
Diffstat (limited to 'TextureLoader/src/Image.cpp')
-rw-r--r--TextureLoader/src/Image.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/TextureLoader/src/Image.cpp b/TextureLoader/src/Image.cpp
index 2cf0dbe..babc6c5 100644
--- a/TextureLoader/src/Image.cpp
+++ b/TextureLoader/src/Image.cpp
@@ -215,8 +215,7 @@ namespace Diligent
m_Desc.NumComponents = png_get_channels(png, info);
auto bit_depth = png_get_bit_depth(png, info);
m_Desc.BitsPerPixel = bit_depth * m_Desc.NumComponents;
- auto color_type = png_get_color_type(png, info);
-
+
// PNG files store 16-bit pixels in network byte order (big-endian, ie
// most significant bytes first). png_set_swap() shall switch the byte-order
// to little-endian (ie, least significant bits first).
@@ -224,6 +223,7 @@ namespace Diligent
png_set_swap(png);
#if 0
+ auto color_type = png_get_color_type(png, info);
// Read any color_type into 8bit depth, RGBA format.
// See http://www.libpng.org/pub/png/libpng-manual.txt