{"action":"created","issue":{"url":"https://api.github.com/repos/uclouvain/openjpeg/issues/613","labels_url":"https://api.github.com/repos/uclouvain/openjpeg/issues/613/labels{/name}","comments_url":"https://api.github.com/repos/uclouvain/openjpeg/issues/613/comments","events_url":"https://api.github.com/repos/uclouvain/openjpeg/issues/613/events","html_url":"https://github.com/uclouvain/openjpeg/issues/613","id":109464165,"number":613,"title":"Decompression does not work with sequential data source","user":{"login":"smuehlst","id":98944,"avatar_url":"https://avatars.githubusercontent.com/u/98944?v=3","gravatar_id":"","url":"https://api.github.com/users/smuehlst","html_url":"https://github.com/smuehlst","followers_url":"https://api.github.com/users/smuehlst/followers","following_url":"https://api.github.com/users/smuehlst/following{/other_user}","gists_url":"https://api.github.com/users/smuehlst/gists{/gist_id}","starred_url":"https://api.github.com/users/smuehlst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smuehlst/subscriptions","organizations_url":"https://api.github.com/users/smuehlst/orgs","repos_url":"https://api.github.com/users/smuehlst/repos","events_url":"https://api.github.com/users/smuehlst/events{/privacy}","received_events_url":"https://api.github.com/users/smuehlst/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-02T10:01:13Z","updated_at":"2015-10-02T10:11:47Z","closed_at":null,"body":"I'm referring to the thread [Decompressing JPEG2000 from sequential input](https://groups.google.com/d/topic/openjpeg/KS-rcZuNQGM/discussion) on the OpenJPEG mailing list.\r\n\r\nI 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\".\r\n\r\nIn 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.\r\n\r\nThis was tested with the current HEAD of the master branch, cf352af089bd6adc89130fa839c57779e4870e6f at the time of this writing.\r\n"},"comment":{"url":"https://api.github.com/repos/uclouvain/openjpeg/issues/comments/144982641","html_url":"https://github.com/uclouvain/openjpeg/issues/613#issuecomment-144982641","issue_url":"https://api.github.com/repos/uclouvain/openjpeg/issues/613","id":144982641,"user":{"login":"malaterre","id":228803,"avatar_url":"https://avatars.githubusercontent.com/u/228803?v=3","gravatar_id":"","url":"https://api.github.com/users/malaterre","html_url":"https://github.com/malaterre","followers_url":"https://api.github.com/users/malaterre/followers","following_url":"https://api.github.com/users/malaterre/following{/other_user}","gists_url":"https://api.github.com/users/malaterre/gists{/gist_id}","starred_url":"https://api.github.com/users/malaterre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malaterre/subscriptions","organizations_url":"https://api.github.com/users/malaterre/orgs","repos_url":"https://api.github.com/users/malaterre/repos","events_url":"https://api.github.com/users/malaterre/events{/privacy}","received_events_url":"https://api.github.com/users/malaterre/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T10:11:47Z","updated_at":"2015-10-02T10:11:47Z","body":"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."}}