Skip to content

Commit

Permalink
Enabled EXR screenshots compression.
Browse files Browse the repository at this point in the history
EXR screenshots have a reasonable size now. Yay!
  • Loading branch information
AnotherCommander authored Sep 2, 2024
1 parent 953e340 commit 181c4f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/SDL/EXRSnapshotSupport/OOSaveEXRSnapshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ int SaveEXRSnapshot(const char* outfilename, int width, int height, const float*
image.height = height;

header.num_channels = 3;
header.compression_type = TINYEXR_COMPRESSIONTYPE_ZIP;
header.channels = (EXRChannelInfo *)malloc(sizeof(EXRChannelInfo) * header.num_channels);
// Must be BGR(A) order, since most of EXR viewers expect this channel order.
strncpy(header.channels[0].name, "B", 255); header.channels[0].name[strlen("B")] = '\0';
Expand Down

0 comments on commit 181c4f3

Please sign in to comment.