We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 44119c2 commit 578c67bCopy full SHA for 578c67b
src/lib/openjp2/jp2.c
@@ -1987,6 +1987,12 @@ OPJ_BOOL opj_jp2_setup_encoder(opj_jp2_t *jp2,
1987
if (image->icc_profile_len) {
1988
jp2->meth = 2;
1989
jp2->enumcs = 0;
1990
+ jp2->color.icc_profile_buf = (OPJ_BYTE *)opj_malloc(image->icc_profile_len);
1991
+ if (jp2->color.icc_profile_buf) {
1992
+ jp2->color.icc_profile_len = image->icc_profile_len;
1993
+ memcpy(jp2->color.icc_profile_buf, image->icc_profile_buf,
1994
+ image->icc_profile_len);
1995
+ }
1996
} else {
1997
jp2->meth = 1;
1998
if (image->color_space == OPJ_CLRSPC_SRGB) {
0 commit comments