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

Add capability to decode only a subset of all components of an image. #1022

Merged
merged 2 commits into from
Sep 26, 2017

Conversation

rouault
Copy link
Collaborator

@rouault rouault commented Sep 19, 2017

#This adds a opj_set_decoded_components(opj_codec_t p_codec,
OPJ_UINT32 numcomps, const OPJ_UINT32
comps_indices, OPJ_BOOL apply_color_transforms) function, and equivalent "opj_decompress -c compno[,compno]*" option.

When specified, neither the MCT transform nor JP2 channel transformations
will be applied (apply_color_transforms must be set to OPJ_FALSE)

Tests added for various combinations of whole image vs tiled-based decoding,
full or reduced resolution, use of decode area or not.

This adds a opj_set_decoded_components(opj_codec_t *p_codec,
OPJ_UINT32 numcomps, const OPJ_UINT32* comps_indices) function,
and equivalent "opj_decompress -c compno[,compno]*" option.

When specified, neither the MCT transform nor JP2 channel transformations
will be applied.

Tests added for various combinations of whole image vs tiled-based decoding,
full or reduced resolution, use of decode area or not.
…forms parameter in case we support it in the future
@rouault
Copy link
Collaborator Author

rouault commented Sep 19, 2017

@detonin This is the functionnality I mentionned a few weeks ago during one of our meetings. I finally decided to add a new function since that enables more precise runtime checks (and the user can only know the total number of components after opening the file). Do you think this should be merged before or after the next 2.2.1 release ?

@rouault
Copy link
Collaborator Author

rouault commented Sep 26, 2017

@detonin Seing your email to @malaterre , I think you refered to the new function of this PR. Tell me if I should merge it, or just press the merge PR button if you're happy with it.

@detonin
Copy link
Contributor

detonin commented Sep 26, 2017

@rouault yes indeed. Many thanks for this contribution, much appreciated. Merging now.

@detonin detonin merged commit d45ccb0 into uclouvain:master Sep 26, 2017
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