Home | History | Annotate | Download | only in libopenjpeg20

Lines Matching refs:image

35 	opj_image_t *image = (opj_image_t*)opj_calloc(1, sizeof(opj_image_t));
36 return image;
41 opj_image_t *image = NULL;
43 image = (opj_image_t*) opj_calloc(1, sizeof(opj_image_t));
44 if(image) {
45 image->color_space = clrspc;
46 image->numcomps = numcmpts;
48 image->comps = (opj_image_comp_t*)opj_calloc(1,image->numcomps * sizeof(opj_image_comp_t));
49 if(!image->comps) {
51 /* fprintf(stderr,"Unable to allocate memory for image.\n"); */
52 opj_image_destroy(image);
55 /* create the individual image components */
57 opj_image_comp_t *comp = &image->comps[compno];
70 /* fprintf(stderr,"Unable to allocate memory for image.\n"); */
71 opj_image_destroy(image);
77 return image;
80 void OPJ_CALLCONV opj_image_destroy(opj_image_t *image) {
81 if(image) {
82 if(image->comps) {
85 /* image components */
86 for(compno = 0; compno < image->numcomps; compno++) {
87 opj_image_comp_t *image_comp = &(image->comps[compno]);
92 opj_free(image->comps);
95 if(image->icc_profile_buf) {
96 opj_free(image->icc_profile_buf);
99 opj_free(image);
104 * Updates the components characteristics of the image from the coding parameters.
106 * @param p_image_header the image header to update.
107 * @param p_cp the coding parameters from which to update the image.
141 * Copy only header of image and its component header (no data are copied)
142 * if dest image have data, they will be freed
144 * @param p_image_src the src image
145 * @param p_image_dest the dest image
210 opj_image_t *image = 00;
212 image = (opj_image_t*) opj_calloc(1,sizeof(opj_image_t));
213 if (image)
216 image->color_space = clrspc;
217 image->numcomps = numcmpts;
220 image->comps = (opj_image_comp_t*)opj_calloc(image->numcomps, sizeof(opj_image_comp_t));
221 if (!image->comps) {
222 opj_image_destroy(image);
226 /* create the individual image components */
228 opj_image_comp_t *comp = &image->comps[compno];
241 return image;