|
|
|
@@ -4395,7 +4395,7 @@ static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) |
|
|
|
if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG"); |
|
|
|
if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG"); |
|
|
|
has_trans = 1; |
|
|
|
for (k=0; k < s->img_n; ++k) |
|
|
|
for (k=0; k < s->img_n && k < 3; ++k) |
|
|
|
tc[k] = (stbi_uc) (stbi__get16be(s) & 255) * stbi__depth_scale_table[depth]; // non 8-bit images will be larger |
|
|
|
} |
|
|
|
break; |
|
|
|
|