Skip to content

Commit

Permalink
Fix exporting R8 files as PNG using libpng
Browse files Browse the repository at this point in the history
Fixes an incorrect stride value for R8 images being exported to PNG on
the experimental libpng SaveToPNGFile implementation.
  • Loading branch information
brunoanc committed Sep 1, 2024
1 parent 327c200 commit 9cf30e2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Auxiliary/DirectXTexPNG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ namespace
{
case DXGI_FORMAT_R8_UNORM:
color_type = PNG_COLOR_TYPE_GRAY;
channel = 1;
break;
case DXGI_FORMAT_B8G8R8A8_UNORM:
case DXGI_FORMAT_B8G8R8X8_UNORM:
Expand Down

0 comments on commit 9cf30e2

Please sign in to comment.