From 5821c709fe6b9099884c7260b3070b9a699a85d6 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 9 Oct 2009 03:06:44 +0000 Subject: Don't dump box unless debug is turned on git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1005 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/jpeg2000/libjasper/README | 4 +++- converter/other/jpeg2000/libjasper/jp2/jp2_cod.c | 5 +++-- converter/other/jpeg2000/libjasper/jp2/jp2_dec.c | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'converter/other/jpeg2000') diff --git a/converter/other/jpeg2000/libjasper/README b/converter/other/jpeg2000/libjasper/README index 27aaacd3..b0512fe8 100644 --- a/converter/other/jpeg2000/libjasper/README +++ b/converter/other/jpeg2000/libjasper/README @@ -6,10 +6,12 @@ The adaptation was done by Bryan Henderson on 2002.10.26. The adaptation involved: - - remove stuff for formats other than JPEG-2000. + - Remove stuff for formats other than JPEG-2000. - Replace build stuff (Jasper uses GNU Autoconf/Automake/Libtool). + - Make JP2 decoder not dump the box to stderr unless debug is turned on. + See . diff --git a/converter/other/jpeg2000/libjasper/jp2/jp2_cod.c b/converter/other/jpeg2000/libjasper/jp2/jp2_cod.c index cb70fd24..f8fc013b 100644 --- a/converter/other/jpeg2000/libjasper/jp2/jp2_cod.c +++ b/converter/other/jpeg2000/libjasper/jp2/jp2_cod.c @@ -337,8 +337,9 @@ jp2_box_t *jp2_box_get(jas_stream_t *in) jas_stream_close(tmpstream); } - jp2_box_dump(box, stderr); - + if (jas_getdbglevel() > 0) { + jp2_box_dump(box, stderr); + } return box; abort(); diff --git a/converter/other/jpeg2000/libjasper/jp2/jp2_dec.c b/converter/other/jpeg2000/libjasper/jp2/jp2_dec.c index 3cce9278..aaebf411 100644 --- a/converter/other/jpeg2000/libjasper/jp2/jp2_dec.c +++ b/converter/other/jpeg2000/libjasper/jp2/jp2_dec.c @@ -340,7 +340,8 @@ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr) iccp = dec->colr->data.colr.iccp; cs = (iccp[16] << 24) | (iccp[17] << 16) | (iccp[18] << 8) | iccp[19]; - jas_eprintf("ICC Profile CS %08x\n", cs); + if (jas_getdbglevel() > 1) + jas_eprintf("ICC Profile CS %08x\n", cs); jas_image_setcolorspace(dec->image, fromiccpcs(cs)); break; } @@ -454,7 +455,6 @@ jas_image_t *jp2_decode(jas_stream_t *in, char *optstr) jas_eprintf("error: no components\n"); goto error; } -fprintf(stderr, "no of components is %d\n", jas_image_numcmpts(dec->image)); /* Prevent the image from being destroyed later. */ image = dec->image; -- cgit 1.4.1