summaryrefslogtreecommitdiff
path: root/libopenjpeg/image.c
diff options
context:
space:
mode:
authorFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-09-07 15:01:55 +0000
committerFrancois-Olivier Devaux <fodevaux@users.noreply.github.com>2007-09-07 15:01:55 +0000
commit3816e0edf40b766ab78cdbf3ba5634b684630d0f (patch)
treeaf0ef564292e21011947790793b59f79a16940d3 /libopenjpeg/image.c
parente7149e0c567d38e61b69db44ecda7f228310291d (diff)
Indexes can now be generated when decoding J2K codestreams.
Diffstat (limited to 'libopenjpeg/image.c')
-rw-r--r--libopenjpeg/image.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libopenjpeg/image.c b/libopenjpeg/image.c
index 26d2074a..6698f459 100644
--- a/libopenjpeg/image.c
+++ b/libopenjpeg/image.c
@@ -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;
}