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

OpenJPEG fails to decode partial j2c where kdu succeeds #715

Closed
RyeMutt opened this issue Feb 22, 2016 · 8 comments · May be fixed by #1219
Closed

OpenJPEG fails to decode partial j2c where kdu succeeds #715

RyeMutt opened this issue Feb 22, 2016 · 8 comments · May be fixed by #1219

Comments

@RyeMutt
Copy link

RyeMutt commented Feb 22, 2016

OpenJPEG fails to decode the attached partial j2c that kdu_show succesfully decodes and renders.

Tested against OpenJPEG master branch.

opj_decompress reports the following error:

Tile part length size inconsistent with stream length

testimg1.zip

@boxerab
Copy link
Contributor

boxerab commented May 2, 2016

What is a partial j2c ?

@RyeMutt
Copy link
Author

RyeMutt commented Jun 12, 2016

I didn't really know what else to call it, but the software we work with(SecondLife opensource clients) decodes j2c files while they're downloading so that potentially only a piece of the file is available while it's decoding until full download is complete. When OpenJpeg 2.x tries to decode the partially downloaded file it outputs a garbled black/rainbow colored image, but OpenJpeg 1.5.0 works fine.

@duhaime
Copy link

duhaime commented May 23, 2017

@CmdrCupcake I'm working with a team that's trying to convert/restore some partial jp2s, and I'm wondering if the library you're using might be able to aid us in our quest (openjpeg fails to convert the images). Do you have a link to the source you're using to decode partial j2c files?

@RyeMutt
Copy link
Author

RyeMutt commented May 23, 2017

The last version of openjpeg that could decode incomplete j2c streams was 1.5.0 in our usage(partially downloaded texture data for OpenSim/SecondLife protocol clients and servers). I believe the commercial kakadu library is also capable of this.

@duhaime
Copy link

duhaime commented May 23, 2017

Ah, thanks so much @CmdrCupcake! I don't think we're going to spring for the Kakadu license but I'm going to check out openjpeg@1.5.0. Thanks again for following up!

@jarrelscy
Copy link

2 years late.... but if you still care:
https://github.com/jarrelscy/openjpeg

I made some changes to the 2.3.1 repo that enable partial decoding.

@chafey
Copy link
Contributor

chafey commented May 19, 2020

I also implemented this here: #1251, not sure how it compares to @jarrelscy version

@Neopallium
Copy link
Contributor

I updated @chafey PR. #1407

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 a pull request may close this issue.

6 participants