secondlife / viewer

🖥️ Second Life's official client
GNU Lesser General Public License v2.1
206 stars 53 forks source link

Permission to submit a J2C file for OpenJPEG Bug report #2417

Open TommyTheTerrible opened 2 weeks ago

TommyTheTerrible commented 2 weeks ago

Description

Hello,

I have been working on trying to get the texture system working flawlessly on OpenJPEG 2.5 but ran into a decoder issue this weekend that might require submitting an example file to the OpenJPEG team.

I do not know the owner of the texture so I cannot contact them to ask for permission so I am hoping Linden Labs can grant me permission instead.

The UUID of the file with the issue: 3e179b1a-b608-70d8-e283-deeb2618cd02

I downloaded it from the CDN and opened in GIMP. GIMP rendered what looked like a tiny little flat rat with a lot of transparency but when I ran the file through opj_decompress it looked like a dashboard for a car with a black rectangle in the middle and no transparency.

I realized that there seems to be two layers to the file, one which is a solid black rectangle with an alpha mask meant to create a dial on the dashboard and then a layer beneath of the dashboard itself.

GIMP only seems to see the first layer (the dial), while OpenJPEG seems to be ignoring the alpha mask on the first layer but seeing both (black rectangle over dashboard). The OpenJPEG obj_dump utility only reports one tile in the file.

I will see if we can adjust the viewer's decode code to fix the issue, but I thought I should submit it to OpenJPEG as well. Would be nice to have permission to use it for a GIMP bug submission too, though out of scope.

Thank you!

P.S. Anyone with a KDU license that is curious, I would be interested to hear how the file decodes from the library.

TommyTheTerrible commented 2 weeks ago

Tested uncompressing with demo applications from Kakadu's website and it shows the same output as OpenJPEG, a black rectangle where the dial should be (alpha ignored) and the dashboard background.

So, either both libraries are not reading the layers properly, the viewer is not decoding them properly or perhaps this file is off spec?

I will look into the decoding and J2C specs but would still be nice to have permission to submit the file to OpenJPEG and Kakadu for their thoughts.

(I don't know what the above link provides but the account seems deleted and I'm not risking the download.)