diff options
| author | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2007-09-07 15:01:55 +0000 |
|---|---|---|
| committer | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2007-09-07 15:01:55 +0000 |
| commit | 3816e0edf40b766ab78cdbf3ba5634b684630d0f (patch) | |
| tree | af0ef564292e21011947790793b59f79a16940d3 /codec/convert.c | |
| parent | e7149e0c567d38e61b69db44ecda7f228310291d (diff) | |
Indexes can now be generated when decoding J2K codestreams.
Diffstat (limited to 'codec/convert.c')
| -rw-r--r-- | codec/convert.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/codec/convert.c b/codec/convert.c index d074909f..013bc152 100644 --- a/codec/convert.c +++ b/codec/convert.c @@ -1795,7 +1795,7 @@ opj_image_t* rawtoimage(const char *filename, opj_cparameters_t *parameters, raw opj_image_t * image = NULL; unsigned short ch; - if((raw_cp->rawWidth * raw_cp->rawHeight * raw_cp->rawComp * raw_cp->rawBitDepth) == 0) + if((! (raw_cp->rawWidth & raw_cp->rawHeight & raw_cp->rawComp & raw_cp->rawBitDepth)) == 0) { fprintf(stderr,"\nError: invalid raw image parameters\n"); fprintf(stderr,"Please use the Format option -F:\n"); @@ -1834,7 +1834,6 @@ opj_image_t* rawtoimage(const char *filename, opj_cparameters_t *parameters, raw fclose(f); return NULL; } - /* set image offset and reference grid */ image->x0 = parameters->image_offset_x0; image->y0 = parameters->image_offset_y0; @@ -1871,7 +1870,6 @@ opj_image_t* rawtoimage(const char *filename, opj_cparameters_t *parameters, raw if (fread(&ch, 1, 1, f)) { fprintf(stderr,"Warning. End of raw file not reached... processing anyway\n"); } - fclose(f); return image; |
