Skip to content

Commit b76cecc

Browse files
authored
Merge pull request #310 from dgelessus/fix_plMipmap_JPEG_alpha_color_channel
Fix `plMipmap` JPEG decompression using the wrong channel for JPEG alpha
2 parents 83e9d9f + 513d465 commit b76cecc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/PRP/Surface/plMipmap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ void plMipmap::DecompressImage(size_t level, void* dest, size_t size) const
701701
unsigned int* dp = (unsigned int*)dest;
702702
unsigned int* sp = (unsigned int*)jbuffer;
703703
for (size_t i=0; i<(size/4); i++)
704-
dp[i] = (dp[i] & 0x00FFFFFF) | ((sp[i] << 24) & 0xFF000000);
704+
dp[i] = (dp[i] & 0x00FFFFFF) | ((sp[i] << 8) & 0xFF000000);
705705
}
706706

707707
free_aligned(jbuffer);

0 commit comments

Comments
 (0)