/* Palette mapping: */
new_comps[i].data = (OPJ_INT32*)
- opj_image_data_alloc(old_comps[cmp].w * old_comps[cmp].h * sizeof(OPJ_INT32));
+ opj_image_data_alloc(sizeof(OPJ_INT32) * old_comps[cmp].w * old_comps[cmp].h);
if (!new_comps[i].data) {
while (i > 0) {
-- i;
/* Direct use: */
if (cmap[i].mtyp == 0) {
- assert(cmp == 0);
dst = new_comps[i].data;
assert(dst);
for (j = 0; j < max; ++j) {
return OPJ_FALSE;
}
- entries = (OPJ_UINT32*) opj_malloc((size_t)nr_channels * nr_entries * sizeof(
- OPJ_UINT32));
+ entries = (OPJ_UINT32*) opj_malloc(sizeof(OPJ_UINT32) * nr_channels *
+ nr_entries);
if (!entries) {
return OPJ_FALSE;
}
"COLR BOX meth value is not a regular value (%d), "
"so we will ignore the entire Colour Specification box. \n", jp2->meth);
}
- if (jp2->color.jp2_has_colr) {
- jp2->j2k->enumcs = jp2->enumcs;
- }
+
return OPJ_TRUE;
}