提交 6645ea59 编写于 作者: R rmitton

Fixed stupid endianness bug.

Incorrect endianness hilariously doesn't manifest _if_ the original
image was upconverted from 8-bit to 16-bit.
上级 608cbec1
......@@ -5195,7 +5195,7 @@ static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int
// Read the data.
if (bitdepth == 16) {
for (i = 0; i < pixelCount; i++, p += 4)
*p = stbi__get16le(s) * 255 / 65535;
*p = stbi__get16be(s) * 255 / 65535;
} else {
for (i = 0; i < pixelCount; i++, p += 4)
*p = stbi__get8(s);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册