Skip to content

Commit

Permalink
Set blue channel to 128 for BC5S
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Sep 21, 2023
1 parent e57b08a commit 352bcaa
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file modified Tests/images/bc5s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/libImaging/BcnDecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ decode_bcn(
int sign = strcmp(pixel_format, "BC5S") == 0 ? 1 : 0;
while (bytes >= 16) {
rgba col[16];
memset(col, 0, 16 * sizeof(col[0]));
memset(col, sign ? 128 : 0, 16 * sizeof(col[0]));
decode_bc5_block(col, ptr, sign);
put_block(im, state, (const char *)col, sizeof(col[0]), C);
ptr += 16;
Expand Down

0 comments on commit 352bcaa

Please sign in to comment.