-
Notifications
You must be signed in to change notification settings - Fork 456
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
Decompression does not work with sequential data source #613
Comments
seek function requirement was added recently. There was no such thing in opj 2.0 and opj 2.1.0 release. Please make sure seek is not required. |
I've commited a fix for the workaround of #254 not to be enable if no seek function is provided. Images that are affected by the bug described in #254 will be decoded with a quality loss. |
@mayeut: I tested the fix, and yes, I can build openjpeg without -DOPJ_DISABLE_TPSOT_FIX:BOOL=YES now and I'm still getting a working streaming implementation, thank you. |
Note, I ran into this issue |
I'm referring to the thread Decompressing JPEG2000 from sequential input on the OpenJPEG mailing list.
I want to embed OpenJPEG in an application that reads its data from a data source that is only accessible in a sequential manner. Therefore an opj_stream_t objects was constructed with opj_stream_create() and only the read and skip functions were supplied via opj_stream_set_read_function() and opj_stream_set_skip_function(). With this implementation the decompression of all JPEG 2000 images fails with the error "opj_j2k_apply_nb_tile_parts_correction error".
In the mailing list thread it was suggested to implement the seek function but only implement forward seeking, and that should work, only some features would be missing. I did that, returning OPJ_FALSE in the seek function if a backward seek was attempted, and this didn't change the behavior.
This was tested with the current HEAD of the master branch, cf352af at the time of this writing.
The text was updated successfully, but these errors were encountered: