Have std/gif's palettes be BGRA, not RGB

This commit is contained in:
Nigel Tao committed 2018-05-24 10:33:02 +10:00
1 parent 1444e38d8d
commit 34cfc3f863
8 files changed
+60 -53

No files matched your search

+4 -4
View File
@@ -496,11 +496,11 @@ bool do_test_wuffs_gif_decode(const char* filename,
}
// TODO: provide a public API for getting the palette.
wuffs_base__io_buffer pal_got = {.ptr = dec.private_impl.f_gct,
.len = 3 * 256};
wuffs_base__io_buffer pal_got = {.ptr = dec.private_impl.f_palettes[0],
.len = 4 * 256};
wuffs_base__io_buffer pal_want = {.ptr = global_palette_buffer,
.len = 3 * 256};
pal_got.wi = 3 * 256;
.len = 4 * 256};
pal_got.wi = 4 * 256;
if (!read_file(&pal_want, palette_filename)) {
return false;
}
+1 -1
View File
@@ -20,7 +20,7 @@
#include <sys/time.h>
#define BUFFER_SIZE (64 * 1024 * 1024)
#define PALETTE_BUFFER_SIZE (4 * 245)
#define PALETTE_BUFFER_SIZE (4 * 256)
#define WUFFS_TESTLIB_ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
Binary file not shown.
Binary file not shown.