Skip to content

Conversation

@radarhere
Copy link
Contributor

As per

openjpeg/src/lib/openjp2/jp2.c

Lines 2874 to 2884 in 70e6263

if (jp2->enumcs == 16) {
(*p_image)->color_space = OPJ_CLRSPC_SRGB;
} else if (jp2->enumcs == 17) {
(*p_image)->color_space = OPJ_CLRSPC_GRAY;
} else if (jp2->enumcs == 18) {
(*p_image)->color_space = OPJ_CLRSPC_SYCC;
} else if (jp2->enumcs == 24) {
(*p_image)->color_space = OPJ_CLRSPC_EYCC;
} else if (jp2->enumcs == 12) {
(*p_image)->color_space = OPJ_CLRSPC_CMYK;
} else {

adds CMYK and EYCC to

openjpeg/src/lib/openjp2/jp2.c

Lines 1992 to 1998 in 70e6263

if (image->color_space == 1) {
jp2->enumcs = 16; /* sRGB as defined by IEC 61966-2-1 */
} else if (image->color_space == 2) {
jp2->enumcs = 17; /* greyscale */
} else if (image->color_space == 3) {
jp2->enumcs = 18; /* YUV */
}

jp2->enumcs = 17; /* greyscale */
} else if (image->color_space == 3) {
jp2->enumcs = 18; /* YUV */
} else if (image->color_space == 4) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would you mind using the OPJ_CLRSPC_xxxx enumeration values (for those new entries as well as for the 3 above existing ones?)

@rouault rouault merged commit 2f5a299 into uclouvain:master Jun 14, 2024
@radarhere radarhere deleted the cmyk branch June 14, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants