diff options
| author | Mickael Savinaud <savmickael@users.noreply.github.com> | 2012-05-02 13:37:54 +0000 |
|---|---|---|
| committer | Mickael Savinaud <savmickael@users.noreply.github.com> | 2012-05-02 13:37:54 +0000 |
| commit | e7c8a22c6791aaeba5ab614f0ae058a800510fd5 (patch) | |
| tree | 52ce3402498ce216dc630042e8553181074718c5 /libopenjpeg/image.c | |
| parent | 5652ccc780518aac455c2369f5ffb7b723268281 (diff) | |
[trunk] style
Diffstat (limited to 'libopenjpeg/image.c')
| -rw-r--r-- | libopenjpeg/image.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libopenjpeg/image.c b/libopenjpeg/image.c index 3b87e6c4..baebc2a2 100644 --- a/libopenjpeg/image.c +++ b/libopenjpeg/image.c @@ -201,21 +201,21 @@ opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_c opj_image_t *image = 00; image = (opj_image_t*) opj_malloc(sizeof(opj_image_t)); - if - (image) + if (image) { memset(image,0,sizeof(opj_image_t)); + image->color_space = clrspc; image->numcomps = numcmpts; + /* 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) - { + if (!image->comps) { opj_image_destroy(image); return 00; } memset(image->comps,0,image->numcomps * sizeof(opj_image_comp_t)); + /* create the individual image components */ for(compno = 0; compno < numcmpts; compno++) { opj_image_comp_t *comp = &image->comps[compno]; @@ -230,5 +230,6 @@ opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_c comp->data = 0; } } + return image; } |
