Skip to content

Commit 9cf30e2

Browse files
committed
Fix exporting R8 files as PNG using libpng
Fixes an incorrect stride value for R8 images being exported to PNG on the experimental libpng SaveToPNGFile implementation.
1 parent 327c200 commit 9cf30e2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Auxiliary/DirectXTexPNG.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ namespace
266266
{
267267
case DXGI_FORMAT_R8_UNORM:
268268
color_type = PNG_COLOR_TYPE_GRAY;
269+
channel = 1;
269270
break;
270271
case DXGI_FORMAT_B8G8R8A8_UNORM:
271272
case DXGI_FORMAT_B8G8R8X8_UNORM:

0 commit comments

Comments
 (0)