Indexes can now be generated when decoding J2K codestreams.

This commit is contained in:
Francois-Olivier Devaux
2007-09-07 15:01:55 +00:00
parent e7149e0c56
commit 3816e0edf4
18 changed files with 666 additions and 292 deletions

View File

@@ -42,6 +42,7 @@ opj_image_t* OPJ_CALLCONV opj_image_create(int numcmpts, opj_image_cmptparm_t *c
/* allocate memory for the per-component information */
image->comps = (opj_image_comp_t*)opj_malloc(image->numcomps * sizeof(opj_image_comp_t));
if(!image->comps) {
fprintf(stderr,"Unable to allocate memory for image.\n");
opj_image_destroy(image);
return NULL;
}
@@ -59,6 +60,7 @@ opj_image_t* OPJ_CALLCONV opj_image_create(int numcmpts, opj_image_cmptparm_t *c
comp->sgnd = cmptparms[compno].sgnd;
comp->data = (int*)opj_malloc(comp->w * comp->h * sizeof(int));
if(!comp->data) {
fprintf(stderr,"Unable to allocate memory for image.\n");
opj_image_destroy(image);
return NULL;
}