From e2e51786a0d2c639c2b37a065e0bd82472a09885 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Thu, 16 Jan 2020 15:10:07 +1100 Subject: [PATCH] Add more test/data/*.wbmp files --- test/c/std/wbmp.c | 6 +++--- test/data/README.md | 5 +++-- test/data/bricks-nodither.wbmp | Bin 0 -> 2405 bytes test/data/hat.wbmp | Bin 0 -> 1348 bytes 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 test/data/bricks-nodither.wbmp create mode 100644 test/data/hat.wbmp diff --git a/test/c/std/wbmp.c b/test/c/std/wbmp.c index 7f2010fe..0fc128dd 100644 --- a/test/c/std/wbmp.c +++ b/test/c/std/wbmp.c @@ -93,17 +93,17 @@ const char* test_wuffs_wbmp_decode_image_config() { wuffs_base__io_buffer src = ((wuffs_base__io_buffer){ .data = global_src_slice, }); - CHECK_STRING(read_file(&src, "test/data/muybridge-frame-000.wbmp")); + CHECK_STRING(read_file(&src, "test/data/bricks-nodither.wbmp")); CHECK_STATUS("decode_image_config", wuffs_wbmp__decoder__decode_image_config(&dec, &ic, &src)); uint32_t got_width = wuffs_base__pixel_config__width(&ic.pixcfg); - uint32_t want_width = 30; + uint32_t want_width = 160; if (got_width != want_width) { RETURN_FAIL("width: got %" PRIu32 ", want %" PRIu32, got_width, want_width); } uint32_t got_height = wuffs_base__pixel_config__height(&ic.pixcfg); - uint32_t want_height = 20; + uint32_t want_height = 120; if (got_height != want_height) { RETURN_FAIL("height: got %" PRIu32 ", want %" PRIu32, got_height, want_height); diff --git a/test/data/README.md b/test/data/README.md index b188b3f9..1190ed79 100644 --- a/test/data/README.md +++ b/test/data/README.md @@ -6,8 +6,9 @@ were generated by script/extract-palette-indexes.go The \*.jpeg files are usually the canonical versions of the test/data images, and other versions (\*.bmp, \*.gif, \*.png, \*.tiff) were generated by -ImageMagick's convert command line tool. The \*.webp versions were generated by -the cwebp command line tool. +ImageMagick's convert command line tool. The \*.wbmp versions were generated by +the `script/convert-png-to-wbmp.go` command line tool. The \*.webp versions +were generated by the cwebp command line tool. diff --git a/test/data/bricks-nodither.wbmp b/test/data/bricks-nodither.wbmp new file mode 100644 index 0000000000000000000000000000000000000000..8186e8680b3daaf77eb8b8a0d2df11e1826370e7 GIT binary patch literal 2405 zcmZQzXjG{9|A75J1pH%wf&UNW|Nr~3|NsC02(g0??En9h0I5ZYF+Ql@|3?5M_6Mew zfx)5v{~rdBiAZ7$_Wyq{gT#Iy)G^5a|G^Iu`v4PTW?3>a7#7}!B_$YMMU4D1aI3=GI(Aax)ydn7xUpz8SHeq&&O ziGj>S!ptDOaJ~!!10z%~T80yi)*ccd?|D%bqH!v`wi!tyYkVhmN zkZB-nkCfy~Jph_SEN0U`}2LBWF-e+>T^7#PvT>cL4Lt_{qv2WKTP6HdrCfU*}T z7@_`$$Us7Y8IlPgLJXjE#=yW1$t)l-_5%!%^vMs8AdoOPRvG0{k`y>!@S`Rlu$VlS zghAyZy1zkUXyM2p|NlRF(Z*npQfz}vV_>KUm9r2goCFD> zWdugB7)sDEfQxN3SA$A?bf18nhwd1V^H4&8kpb*H)X-{xI1j}wjt{|3K?!O5-w-jl z51@gE?q7&YP@N1FL&Pux0|Uet(EJQF6yjS%RRa=+ia}BlG@qh~F@sdW&4a`nR19h_ zL;+MUBveom7Bo~qSpcFGM1ms?EqWm#0F5DVRRoP7n3KU}E6i&UCo@2j7u3lR=P}fS zY+wMF=J4ca4-o^~3v(XCJh1!DpMl6TfT|M)1_qGd7+_9jhvuRG|Nk(;^fE)l82|tO z0T*M0|NsBbprHB>691jB|NVRW|Nk4@_XqGWaDWvyPu>>HoijLI}hIsrkVUVnOu&Qirnr|JVP@hqCMc|NjGWHz>^O|NsBN zfDr%3U=HRq)Zc&qNBy1bvcmDEDRhC8f-te|NsB{ivR-) zgHBWBzQ6l_moqT1Ff3rSviraP`+o)oE(Qk%KD+<_|NUiP;9w|nQp@@G|NqAZ1`)<$ z24>B7|L=ZbU=U&a#mex1+yD4A3=9k%?^j%?+kVyl3