*/
#include "opj_includes.h"
+#include <assert.h>
/* ----------------------------------------------------------------------- */
* pos : position, in number of bytes, from the beginning of the stream
*/
void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos) {
+ assert((cio->start + pos) <= cio->end);
cio->bp = cio->start + pos;
}
* Number of bytes left before the end of the stream.
*/
int cio_numbytesleft(opj_cio_t *cio) {
+ assert((cio->end - cio->bp) >= 0);
return cio->end - cio->bp;
}
* Read a byte.
*/
unsigned char cio_bytein(opj_cio_t *cio) {
+ assert(cio->bp >= cio->start);
if (cio->bp >= cio->end) {
opj_event_msg(cio->cinfo, EVT_ERROR, "read error: passed the end of the codestream (start = %d, current = %d, end = %d\n", cio->start, cio->bp, cio->end);
return 0;
unsigned int v;
v = 0;
for (i = n - 1; i >= 0; i--) {
- v += cio_bytein(cio) << (i << 3);
+ v += (unsigned int)cio_bytein(cio) << (i << 3);
}
return v;
}
* n : number of bytes to skip
*/
void cio_skip(opj_cio_t *cio, int n) {
+ assert((cio->bp + n) >= cio->bp);
+ if (((cio->bp + n) < cio->start) || ((cio->bp + n) > cio->end)) {
+ assert(0);
+ }
cio->bp += n;
}
*/
#include "opj_includes.h"
+#include <assert.h>
/** @defgroup J2K J2K - JPEG-2000 codestream reader/writer */
/*@{*/
static void j2k_read_siz(opj_j2k_t *j2k) {
int len, i;
+ int n_comps;
opj_cio_t *cio = j2k->cio;
opj_image_t *image = j2k->image;
if ((image->x0<0)||(image->x1<0)||(image->y0<0)||(image->y1<0)) {
opj_event_msg(j2k->cinfo, EVT_ERROR,
- "%s: invalid image size (x0:%d, x1:%d, y0:%d, y1:%d)\n",
+ "invalid image size (x0:%d, x1:%d, y0:%d, y1:%d)\n",
image->x0,image->x1,image->y0,image->y1);
return;
}
+ n_comps = (len - 36 - 2 ) / 3;
+ assert( (len - 36 - 2 ) % 3 == 0 );
image->numcomps = cio_read(cio, 2); /* Csiz */
+ assert( n_comps == image->numcomps );
+
+ /* testcase 4035.pdf.SIGSEGV.d8b.3375 */
+ if (image->x0 > image->x1 || image->y0 > image->y1) {
+ opj_event_msg(j2k->cinfo, EVT_ERROR, "Error with SIZ marker: negative image size (%d x %d)\n", image->x1 - image->x0, image->y1 - image->y0);
+ return;
+ }
+ /* testcase 2539.pdf.SIGFPE.706.1712 (also 3622.pdf.SIGFPE.706.2916 and 4008.pdf.SIGFPE.706.3345 and maybe more) */
+ if (!(cp->tdx * cp->tdy)) {
+ opj_event_msg(j2k->cinfo, EVT_ERROR, "Error with SIZ marker: invalid tile size (tdx: %d, tdy: %d)\n", cp->tdx, cp->tdy);
+ return;
+ }
+
+ /* testcase 1610.pdf.SIGSEGV.59c.681 */
+ if (((int64)image->x1) * ((int64)image->y1) != (image->x1 * image->y1)) {
+ opj_event_msg(j2k->cinfo, EVT_ERROR, "Prevent buffer overflow (x1: %d, y1: %d)\n", image->x1, image->y1);
+ return;
+ }
#ifdef USE_JPWL
if (j2k->cp->correct) {
/* prevent division by zero */
if (!(cp->tdx * cp->tdy)) {
- opj_event_msg(j2k->cinfo, EVT_ERROR, "JPWL: invalid tile size (tdx: %d, tdy: %d)\n", cp->tdx, cp->tdy);
+ opj_event_msg(j2k->cinfo, EVT_ERROR, "invalid tile size (tdx: %d, tdy: %d)\n", cp->tdx, cp->tdy);
return;
}
opj_event_msg(j2k->cinfo, EVT_WARNING ,
"bad number of subbands in Sqcx (%d) regarding to J2K_MAXBANDS (%d) \n"
"- limiting number of bands to J2K_MAXBANDS and try to move to the next markers\n", numbands, J2K_MAXBANDS);
+ /* edf_c2_1013627.jp2 */
+ numbands = 1;
}
#endif /* USE_JPWL */
len = cio_read(cio, 2); /* Lpoc */
numpchgs = (len - 2) / (5 + 2 * (numcomps <= 256 ? 1 : 2));
+ if( numpchgs >= 32 )
+ {
+ /* edf_c2_1103421.jp2 */
+ opj_event_msg(j2k->cinfo, EVT_ERROR,
+ "bad number of POCS (%d out of a maximum of %d)\n",
+ numpchgs, 32);
+ numpchgs = 0;
+ }
+
for (i = old_poc; i < numpchgs + old_poc; i++) {
opj_poc_t *poc;
poc = &tcp->pocs[i];
}
data = j2k->tile_data[curtileno];
+ data_ptr = data; /* store in case of failure */
data = (unsigned char*) opj_realloc(data, (j2k->tile_len[curtileno] + len) * sizeof(unsigned char));
+ if( data == NULL ) {
+ opj_event_msg(j2k->cinfo, EVT_ERROR, "Could not reallocated\n" );
+ opj_free( data_ptr );
+ return;
+ }
data_ptr = data + j2k->tile_len[curtileno];
for (i = 0; i < len; i++) {
{
tileno = j2k->cp->tileno[i];
success = tcd_decode_tile(tcd, j2k->tile_data[tileno], j2k->tile_len[tileno], tileno, j2k->cstr_info);
+ assert( tileno != -1 );
opj_free(j2k->tile_data[tileno]);
j2k->tile_data[tileno] = NULL;
tcd_free_decode_tile(tcd, i);
if(j2k->cp != NULL) {
for (i = 0; i < j2k->cp->tileno_size; i++) {
int tileno = j2k->cp->tileno[i];
- opj_free(j2k->tile_data[tileno]);
- j2k->tile_data[tileno] = NULL;
+ if( tileno != -1 )
+ {
+ opj_free(j2k->tile_data[tileno]);
+ j2k->tile_data[tileno] = NULL;
+ }
}
}
}
if (j2k->state == J2K_STATE_NEOC) {
j2k_read_eoc(j2k);
+ /* Check one last time for errors during decoding before returning */
+ if (j2k->state & J2K_STATE_ERR) {
+ opj_image_destroy(image);
+ return NULL;
+ }
}
if (j2k->state != J2K_STATE_MT) {
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "opj_includes.h"
+#include <assert.h>
/** @defgroup JP2 JP2 - JPEG-2000 file format reader/writer */
/*@{*/
}
else if (box->length == 0) {
box->length = cio_numbytesleft(cio) + 8;
- }
- if (box->length < 0) {
+ } else if (box->length < 0) {
opj_event_msg(cinfo, EVT_ERROR, "Integer overflow in box->length\n");
return OPJ_FALSE; /* TODO: actually check jp2_read_boxhdr's return value */
}
jp2->brand = cio_read(cio, 4); /* BR */
jp2->minversion = cio_read(cio, 4); /* MinV */
jp2->numcl = (box.length - 16) / 4;
+
+ /* edf_c2_1673169.jp2 */
+ if (cio_numbytesleft(cio) < ((int)jp2->numcl * 4)) {
+ opj_event_msg(cinfo, EVT_ERROR, "Not enough bytes in FTYP Box "
+ "(expected %d, but only %d left)\n",
+ ((int)jp2->numcl * 4), cio_numbytesleft(cio));
+ return OPJ_FALSE;
+ }
jp2->cl = (unsigned int *) opj_malloc(jp2->numcl * sizeof(unsigned int));
for (i = 0; i < (int)jp2->numcl; i++) {
*/
#include "opj_includes.h"
+#include <assert.h>
/** @defgroup T2 T2 - Implementation of a tier-2 coding */
/*@{*/
int precno = pi->precno; /* precinct value */
int layno = pi->layno; /* quality layer value */
- opj_tcd_resolution_t* res = &tile->comps[compno].resolutions[resno];
-
unsigned char *hd = NULL;
int present;
opj_bio_t *bio = NULL; /* BIO component */
-
+
+ opj_tcd_resolution_t* res;
+ assert(&tile->comps[compno] != NULL);
+ res = &tile->comps[compno].resolutions[resno];
+
if (layno == 0) {
for (bandno = 0; bandno < res->numbands; bandno++) {
opj_tcd_band_t *band = &res->bands[bandno];
if (l == -999) {
eof = 1;
opj_event_msg(tcd->cinfo, EVT_ERROR, "tcd_decode: incomplete bistream\n");
+ return OPJ_FALSE;
}
/*------------------TIER1-----------------*/
int n = (tile->comps[0].x1 - tile->comps[0].x0) * (tile->comps[0].y1 - tile->comps[0].y0);
if (tile->numcomps >= 3 ){
+ /* testcase 1336.pdf.asan.47.376 */
+ if ((tile->comps[0].x1 - tile->comps[0].x0) * (tile->comps[0].y1 - tile->comps[0].y0) < n ||
+ ( tile->comps[1].x1 - tile->comps[1].x0) * (tile->comps[1].y1 - tile->comps[1].y0) < n ||
+ ( tile->comps[2].x1 - tile->comps[2].x0) * (tile->comps[2].y1 - tile->comps[2].y0) < n) {
+ opj_event_msg(tcd->cinfo, EVT_ERROR, "Tiles don't all have the same dimension. Skip the MCT step.\n");
+ return OPJ_FALSE;
+ }
if (tcd->tcp->tccps[0].qmfbid == 1) {
mct_decode(
tile->comps[0].data,
j2k_to_image -i @INPUT_NR_PATH@/Bretagne2.j2k -o @TEMP_PATH@/Bretagne2.j2k.pgx
j2k_to_image -i @INPUT_NR_PATH@/_00042.j2k -o @TEMP_PATH@/_00042.j2k.pgx
j2k_to_image -i @INPUT_NR_PATH@/123.j2c -o @TEMP_PATH@/123.j2c.pgx
-j2k_to_image -i @INPUT_NR_PATH@/broken.jp2 -o @TEMP_PATH@/broken.jp2.pgx
-j2k_to_image -i @INPUT_NR_PATH@/broken2.jp2 -o @TEMP_PATH@/broken2.jp2.pgx
-j2k_to_image -i @INPUT_NR_PATH@/broken3.jp2 -o @TEMP_PATH@/broken3.jp2.pgx
-j2k_to_image -i @INPUT_NR_PATH@/broken4.jp2 -o @TEMP_PATH@/broken4.jp2.pgx
+# The 4 following tests should failed (kakadu indicates that they are corrupted)
+!j2k_to_image -i @INPUT_NR_PATH@/broken.jp2 -o @TEMP_PATH@/broken.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/broken2.jp2 -o @TEMP_PATH@/broken2.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/broken3.jp2 -o @TEMP_PATH@/broken3.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/broken4.jp2 -o @TEMP_PATH@/broken4.jp2.pgx
j2k_to_image -i @INPUT_NR_PATH@/bug.j2c -o @TEMP_PATH@/bug.j2c.pgx
j2k_to_image -i @INPUT_NR_PATH@/buxI.j2k -o @TEMP_PATH@/buxI.j2k.pgx
j2k_to_image -i @INPUT_NR_PATH@/buxR.j2k -o @TEMP_PATH@/buxR.j2k.pgx
j2k_to_image -i @INPUT_NR_PATH@/orb-blue10-win-jp2.jp2 -o @TEMP_PATH@/orb-blue10-win-jp2.jp2.pgx
j2k_to_image -i @INPUT_NR_PATH@/relax.jp2 -o @TEMP_PATH@/relax.jp2.pgx
j2k_to_image -i @INPUT_NR_PATH@/test_lossless.j2k -o @TEMP_PATH@/test_lossless.j2k.pgx
+# text_GBR.jp2 file exhibt a error about a tile part with a index > of the number of tile-part in this tile (related to issue 202, 206, 208)
j2k_to_image -i @INPUT_NR_PATH@/text_GBR.jp2 -o @TEMP_PATH@/text_GBR.jp2.pgx
+# pacs.ge file should throw an error but finally it seems work with v2
+j2k_to_image -i @INPUT_NR_PATH@/pacs.ge.j2k -o @TEMP_PATH@/pacs.ge.j2k.pgx
+# related to issue 135
+j2k_to_image -i @INPUT_NR_PATH@/kodak_2layers_lrcp.j2c -o @TEMP_PATH@/kodak_2layers_lrcp.j2c.pgx
+j2k_to_image -i @INPUT_NR_PATH@/kodak_2layers_lrcp.j2c -o @TEMP_PATH@/kodak_2layers_lrcp.j2c.pgx -l 2
+# related to issue 104 and 110
j2k_to_image -i @INPUT_NR_PATH@/issue104_jpxstream.jp2 -o @TEMP_PATH@/issue104_jpxstream.jp2.pgx
+# File not supported by kakadu (Malformed PCLR box) and not supoprter by openjpeg (problem with value of TPSot)
+!j2k_to_image -i @INPUT_NR_PATH@/mem-b2ace68c-1381.jp2 -o @TEMP_PATH@/mem-b2ace68c-1381.jp2.pgx
+# File which produced weird output with kakadu and not supoprter by openjpeg (problem with value of TPSot, issue 202, 206, 208)
+j2k_to_image -i @INPUT_NR_PATH@/mem-b2b86b74-2753.jp2 -o @TEMP_PATH@/mem-b2b86b74-2753.jp2.pgx
+# issue 191 raised by the gdal fuzzer test (should properly failed)
+!j2k_to_image -i @INPUT_NR_PATH@/gdal_fuzzer_unchecked_numresolutions.jp2 -o @TEMP_PATH@/gdal_fuzzer_unchecked_numresolutions.pgx
+# issue 192 raised by the gdal fuzzer test (should nicely failed)
+!j2k_to_image -i @INPUT_NR_PATH@/gdal_fuzzer_assert_in_opj_j2k_read_SQcd_SQcc.patch.jp2 -o @TEMP_PATH@/gdal_fuzzer_assert_in_opj_j2k_read_SQcd_SQcc.patch.pgx
+# issue 193 raised by the gdal fuzzer test (should nicely failed)
+!j2k_to_image -i @INPUT_NR_PATH@/gdal_fuzzer_check_number_of_tiles.jp2 -o @TEMP_PATH@/gdal_fuzzer_check_number_of_tiles.pgx
+# issue 194 raised by the gdal fuzzer test (should nicely failed)
+!j2k_to_image -i @INPUT_NR_PATH@/gdal_fuzzer_check_comp_dx_dy.jp2 -o @TEMP_PATH@/gdal_fuzzer_check_comp_dx_dy.pgx
+# issue 202
j2k_to_image -i @INPUT_NR_PATH@/file409752.jp2 -o @TEMP_PATH@/file409752.jp2.pgx
+# issue 188
+j2k_to_image -i @INPUT_NR_PATH@/issue188_beach_64bitsbox.jp2 -o @TEMP_PATH@/issue188_beach_64bitsbox.jp2.pgx
+# issue 206
+j2k_to_image -i @INPUT_NR_PATH@/issue206_image-000.jp2 -o @TEMP_PATH@/issue206_image-000.jp2.pgx
+# issue 205
j2k_to_image -i @INPUT_NR_PATH@/issue205.jp2 -o @TEMP_PATH@/issue205.jp2.pgx
+# issue 225 (sumatrapdf)
+!j2k_to_image -i @INPUT_NR_PATH@/451.pdf.SIGSEGV.5b5.3723.jp2 -o @TEMP_PATH@/451.pdf.SIGSEGV.5b5.3723.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/1888.pdf.asan.35.988.jp2 -o @TEMP_PATH@/1888.pdf.asan.35.988.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/2539.pdf.SIGFPE.706.1712.jp2 -o @TEMP_PATH@/2539.pdf.SIGFPE.706.1712.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/2236.pdf.SIGSEGV.398.1376.jp2 -o @TEMP_PATH@/2236.pdf.SIGSEGV.398.1376.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/1336.pdf.asan.47.376.jp2 -o @TEMP_PATH@/1336.pdf.asan.47.376.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/1851.pdf.SIGSEGV.ce9.948.jp2 -o @TEMP_PATH@/1851.pdf.SIGSEGV.ce9.948.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/4149.pdf.SIGSEGV.cf7.3501.jp2 -o @TEMP_PATH@/4149.pdf.SIGSEGV.cf7.3501.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/4035.pdf.SIGSEGV.d8b.3375.jp2 -o @TEMP_PATH@/4035.pdf.SIGSEGV.d8b.3375.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/2977.pdf.asan.67.2198.jp2 -o @TEMP_PATH@/2977.pdf.asan.67.2198.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/451.pdf.SIGSEGV.ce9.3723.jp2 -o @TEMP_PATH@/451.pdf.SIGSEGV.ce9.3723.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/3635.pdf.asan.77.2930.jp2 -o @TEMP_PATH@/3635.pdf.asan.77.2930.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/1802.pdf.SIGSEGV.36e.894.jp2 -o @TEMP_PATH@/1802.pdf.SIGSEGV.36e.894.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/451.pdf.SIGSEGV.f4c.3723.jp2 -o @TEMP_PATH@/451.pdf.SIGSEGV.f4c.3723.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/2.pdf.SIGFPE.706.1112.jp2 -o @TEMP_PATH@/2.pdf.SIGFPE.706.1112.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/147af3f1083de4393666b7d99b01b58b_signal_sigsegv_130c531_6155_5136.jp2 -o @TEMP_PATH@/147af3f1083de4393666b7d99b01b58b_signal_sigsegv_130c531_6155_5136.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/4241ac039aba57e6a9c948d519d94216_asan_heap-oob_14650f2_7469_602.jp2 -o @TEMP_PATH@/4241ac039aba57e6a9c948d519d94216_asan_heap-oob_14650f2_7469_602.jp2
+# issue 228 (16bits/lossy)
+j2k_to_image -i @INPUT_NR_PATH@/issue228.j2k -o @TEMP_PATH@/issue228.j2k.pgx
+# issue 229
+!j2k_to_image -i @INPUT_NR_PATH@/27ac957758a35d00d6765a0c86350d9c.SIGFPE.d25.537.jpc -o @TEMP_PATH@27ac957758a35d00d6765a0c86350d9c.SIGFPE.d25.537.jpc.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/26ccf3651020967f7778238ef5af08af.SIGFPE.d25.527.jp2 -o @TEMP_PATH@26ccf3651020967f7778238ef5af08af.SIGFPE.d25.527.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/0290cb77c5df21828fa74cf2ab2c84d8.SIGFPE.d25.31.jp2 -o @TEMP_PATH@0290cb77c5df21828fa74cf2ab2c84d8.SIGFPE.d25.31.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/3672da2f1f67bbecad27d7181b4e9d7c.SIGFPE.d25.805.jpc -o @TEMP_PATH@3672da2f1f67bbecad27d7181b4e9d7c.SIGFPE.d25.805.jpc.pgx
+# issue 254 (loss in quality)
+j2k_to_image -i @INPUT_NR_PATH@/issue254.jp2 -o @TEMP_PATH@/issue254.jp2.pgx
+# issue 142
+j2k_to_image -i @INPUT_NR_PATH@/issue142.j2k -o @TEMP_PATH@/issue142.j2k.pgx
+# issue 134
+j2k_to_image -i @INPUT_NR_PATH@/issue134.jp2 -o @TEMP_PATH@/issue134.jp2.pgx
+# issue 135
+j2k_to_image -i @INPUT_NR_PATH@/issue135.j2k -o @TEMP_PATH@/issue135.j2k.pgx
+# issue 208
+j2k_to_image -i @INPUT_NR_PATH@/issue208.jp2 -o @TEMP_PATH@/issue208.jp2.pgx
+# issue 211
+j2k_to_image -i @INPUT_NR_PATH@/issue211.jp2 -o @TEMP_PATH@/issue211.jp2.pgx
+# issue 171
+j2k_to_image -i @INPUT_NR_PATH@/issue171.jp2 -o @TEMP_PATH@/issue171.jp2.pgx
+# issue 171
+!j2k_to_image -i @INPUT_NR_PATH@/issue165.jp2 -o @TEMP_PATH@/issue165.jp2.pgx
+#
+!j2k_to_image -i @INPUT_NR_PATH@/broken.jpc -o @TEMP_PATH@/broken.jpc.pgx
+# issue 226
+j2k_to_image -i @INPUT_NR_PATH@/issue226.j2k -o @TEMP_PATH@/issue226.j2k.pgx
+# issue 297
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1103421.jp2 -o @TEMP_PATH@/edf_c2_1103421.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1178956.jp2 -o @TEMP_PATH@/edf_c2_1178956.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1000290.jp2 -o @TEMP_PATH@/edf_c2_1000290.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1000691.jp2 -o @TEMP_PATH@/edf_c2_1000691.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_20.jp2 -o @TEMP_PATH@/edf_c2_20.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1377017.jp2 -o @TEMP_PATH@/edf_c2_1377017.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1002767.jp2 -o @TEMP_PATH@/edf_c2_1002767.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_10025.jp2 -o @TEMP_PATH@/edf_c2_10025.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1000234.jp2 -o @TEMP_PATH@/edf_c2_1000234.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_225881.jp2 -o @TEMP_PATH@/edf_c2_225881.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1000671.jp2 -o @TEMP_PATH@/edf_c2_1000671.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1013627.jp2 -o @TEMP_PATH@/edf_c2_1013627.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1015644.jp2 -o @TEMP_PATH@/edf_c2_1015644.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_101463.jp2 -o @TEMP_PATH@/edf_c2_101463.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1674177.jp2 -o @TEMP_PATH@/edf_c2_1674177.jp2.pgx
+!j2k_to_image -i @INPUT_NR_PATH@/edf_c2_1673169.jp2 -o @TEMP_PATH@/edf_c2_1673169.jp2.pgx