Closed liumazi closed 6 months ago
What tool created the PNG?
I'll try and update to the latest Wuffs release, but if that doesn't work I'll have to raise an issue upstream (https://github.com/google/wuffs) so I can't promise a quick fix.
I use the TPngObject in Delphi to created the PNG. (Portable Network Graphics Delphi 1.5) Only a few PNGS fail to load, most are successful. And, if use astcenc.exe 1.3, will prompt: "Failed to load image xx.png, Reason: tRNS with alpha"
And, if use astcenc.exe 1.3, will prompt: "Failed to load image xx.png, Reason: tRNS with alpha"
The older release used stb_image to load images.
This error is thrown because the PNG is invalid (using a tRNS transparency chunk for a color format with alpha).
The latest Wuffs stable release doesn't fix this, so I've raised an issue upstream to see if they can support this use case in future, but the main problem here is that the image is technically out-of-spec (a tRNS chunk isn't allowed for RGBA color type images).
Upstream did a super-quick fix ❤️, so I'll update shortly.
Fixed in 56395a6fcecaac81ee7c3f03d86dc3c7689f6816
This condition is not met, in wuffs-v0.3.c
if (self->private_impl.f_seen_trns || (self->private_impl.f_color_type > 3) || ((self->private_impl.f_color_type == 3) && !self->private_impl.f_seen_plte))
MakeMirAtlasFromAgePreview.zip