$NetBSD: patch-ae,v 1.1 2002/11/13 14:24:22 dillo Exp $

--- src/libjasper/jp2/jp2_dec.c.orig	Fri Oct 18 23:53:57 2002
+++ src/libjasper/jp2/jp2_dec.c
@@ -339,7 +339,9 @@ jas_image_t *jp2_decode(jas_stream_t *in
 		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;
 	}
@@ -453,7 +455,9 @@ jas_image_t *jp2_decode(jas_stream_t *in
 		jas_eprintf("error: no components\n");
 		goto error;
 	}
-fprintf(stderr, "no of components is %d\n", jas_image_numcmpts(dec->image));
+	if (jas_getdbglevel() >= 1) {
+		fprintf(stderr, "no of components is %d\n", jas_image_numcmpts(dec->image));
+	}
 
 	/* Prevent the image from being destroyed later. */
 	image = dec->image;
