How to get the correct 'transparency' value in the DecodeImage API?
iyzsong opened this issue · comments
Hello, I need get the correct 'transparency' value when using DecodeImage
, correct means the source format does has alpha channel, but now for BMP files I always get PIXEL_FORMAT__BGRA_NONPREMUL
even for 24bpp non-alpha files.
My example code can be found here: https://github.com/iyzsong/onscripter-libretro/blob/main/sdl-libretro/SDL_image.cpp
In SelectPixfmt
, I use ic.pixcfg.pixel_format().transparency()
, which comment as "the image file's natural pixel format", does this pixel_format mean to have the correct transparency value or is there another way to get what I want?
Thanks.
Thanks for the bug report. Let me know if release/c/wuffs-unsupported-snapshot.c
doesn't fix it for you.
It works now, thank you!