From 3a18e3f0cdebb54504d083419377529d1465cf64 Mon Sep 17 00:00:00 2001 From: Sean Fox Date: Sat, 24 Jan 2009 19:29:40 +0000 Subject: Examples now allow partially decoded images. A warning is given for BMP_INSUFFICIENT_DATA, but we still pass the bitmap data to display. svn path=/trunk/libnsbmp/; revision=6252 --- examples/decode_bmp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'examples/decode_bmp.c') diff --git a/examples/decode_bmp.c b/examples/decode_bmp.c index 43b0970..6834318 100644 --- a/examples/decode_bmp.c +++ b/examples/decode_bmp.c @@ -69,8 +69,11 @@ int main(int argc, char *argv[]) /* code = bmp_decode_trans(&bmp, TRANSPARENT_COLOR); */ if (code != BMP_OK) { warning("bmp_decode", code); - res = 1; - goto cleanup; + /* allow partially decoded images */ + if (code != BMP_INSUFFICIENT_DATA) { + res = 1; + goto cleanup; + } } printf("P3\n"); -- cgit v1.2.3