$OpenBSD: patch-src_libjasper_jp2_jp2_cod_c,v 1.1.1.1 2004/05/14 05:33:57 brad Exp $
--- src/libjasper/jp2/jp2_cod.c.orig	2004-02-08 20:34:40.000000000 -0500
+++ src/libjasper/jp2/jp2_cod.c	2004-04-22 21:37:19.000000000 -0400
@@ -774,11 +774,15 @@ static void jp2_cmap_dumpdata(jp2_box_t 
 	jp2_cmap_t *cmap = &box->data.cmap;
 	unsigned int i;
 	jp2_cmapent_t *ent;
-	fprintf(out, "numchans = %d\n", (int) cmap->numchans);
+	if (jas_getdbglevel() >= 1) {
+		fprintf(out, "numchans = %d\n", (int) cmap->numchans);
+	}
 	for (i = 0; i < cmap->numchans; ++i) {
 		ent = &cmap->ents[i];
-		fprintf(out, "cmptno=%d; map=%d; pcol=%d\n",
-		  (int) ent->cmptno, (int) ent->map, (int) ent->pcol);
+		if (jas_getdbglevel() >= 1) {
+			fprintf(out, "cmptno=%d; map=%d; pcol=%d\n",
+			  (int) ent->cmptno, (int) ent->map, (int) ent->pcol);
+		}
 	}
 }
 
