Decode a GIF's width and height.

This commit is contained in:
Nigel Tao committed 2017-06-18 10:05:07 +10:00
1 parent 8d1bf15d70
commit 524d323992
4 files changed
+50

No files matched your search

+14
View File
@@ -263,6 +263,20 @@ void test_gif_decode_input_is_a_xxx(const char* filename,
goto cleanup1;
}
if (want != puffs_gif_status_ok) {
goto cleanup1;
}
// TODO: provide a public API for getting the width and height.
if (dec.private_impl.f_width != 160) {
FAIL("width: got %d, want %d", dec.private_impl.f_width, 160);
goto cleanup1;
}
if (dec.private_impl.f_height != 120) {
FAIL("height: got %d, want %d", dec.private_impl.f_height, 120);
goto cleanup1;
}
cleanup1:
puffs_gif_decoder_destructor(&dec);
cleanup0:;