mirror of
https://gitlab.com/bztsrc/posix-uefi.git
synced 2024-12-29 05:55:31 +01:00
Add support for PNG with palette
This commit is contained in:
parent
74ed2daad9
commit
8d21415f4e
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ err: fprintf(stderr, "unable to allocate memory\n");
|
|||
s.img_buffer_end = s.img_buffer_original_end = buff + size;
|
||||
data = (uint32_t*)stbi__png_load(&s, &w, &h, &l, 0, &ri);
|
||||
if(!data || (l != 3 && l != 4)) {
|
||||
fprintf(stderr, "Unable to decode png: %s\n", data ? "not RGB format" : stbi__g_failure_reason );
|
||||
fprintf(stderr, "Unable to decode png: %s\n", l < 3 ? "not RGB format" : stbi__g_failure_reason );
|
||||
return 0;
|
||||
}
|
||||
/* if we got 24 bit RGB image, convert it to 32 bit RGBA */
|
||||
|
|
Loading…
Reference in a new issue