[trunk] Add debug code to extract decompressed image right before PCLR handling
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Thu, 13 Mar 2014 10:35:41 +0000 (10:35 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Thu, 13 Mar 2014 10:35:41 +0000 (10:35 +0000)
Update issue 235

src/lib/openjp2/j2k.c

index ce5ef77f362ba31b7a194977f67b96820913dd4c..e446dab05c4c7c24440734526975131b1aeff075 100644 (file)
@@ -9322,6 +9322,13 @@ OPJ_BOOL opj_j2k_decode(opj_j2k_t * p_j2k,
         for (compno = 0; compno < p_image->numcomps; compno++) {
                 p_image->comps[compno].resno_decoded = p_j2k->m_output_image->comps[compno].resno_decoded;
                 p_image->comps[compno].data = p_j2k->m_output_image->comps[compno].data;
+#if 0
+                char fn[256];
+                sprintf( fn, "/tmp/%d.raw", compno );
+                FILE *debug = fopen( fn, "wb" );
+                fwrite( p_image->comps[compno].data, sizeof(OPJ_INT32), p_image->comps[compno].w * p_image->comps[compno].h, debug );
+                fclose( debug );
+#endif
                 p_j2k->m_output_image->comps[compno].data = NULL;
         }