}
}/* color_apply_icc_profile() */
+static int are_comps_same_dimensions(opj_image_t * image)
+{
+ unsigned int i;
+ for (i = 1; i < image->numcomps; i++) {
+ if (image->comps[0].dx != image->comps[i].dx ||
+ image->comps[0].dy != image->comps[i].dy) {
+ return OPJ_FALSE;
+ }
+ }
+ return OPJ_TRUE;
+}
+
void color_cielab_to_rgb(opj_image_t *image)
{
int *row;
__FILE__, __LINE__, numcomps);
return;
}
+ if (!are_comps_same_dimensions(image)) {
+ fprintf(stderr,
+ "%s:%d:\n\tcomponents are not all of the same dimension. Quitting.\n",
+ __FILE__, __LINE__);
+ return;
+ }
row = (int*)image->icc_profile_buf;
enumcs = row[0];