Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support setting enumcs for CMYK and EYCC color space #1529

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/lib/openjp2/jp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1995,6 +1995,10 @@ OPJ_BOOL opj_jp2_setup_encoder(opj_jp2_t *jp2,
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?)

jp2->enumcs = 24; /* EYCC */
} else if (image->color_space == 5) {
jp2->enumcs = 12; /* CMYK */
}
}

Expand Down