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

opj_decompress: allow decoding input image and writing output image by chunks #1012

Open
rouault opened this issue Sep 4, 2017 · 0 comments

Comments

@rouault
Copy link
Collaborator

rouault commented Sep 4, 2017

opj_decompress currently decodes the whole image (or the whole decode area) and pass it directly to the output image driver. This strategy is limited by the amount of available RAM and prevents decoding arbitrarily big images (#1010 removes the limitation to 4 billion pixels). Beyond a given threshold, it would be good if opj_decompress could proceed by chunks to read and write. For example for a tiled image with tiles of reasonable size, reading tile by tile would be appropriate. Or for a single-tiled image reading by chunks of several lines (especially once #1010 improvements are merged).

This improvement requires significant changes in the imagetoXXX() functions. Typically they shouldn't receive a opj_image_t* but drives instead the decompression themselves, taking into account the input image structure and their own constraints (in TIFF, you can generate a tiled image or write strips in arbitrary order, but in PNG you need to proceed lines by lines starting by the top).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant