Skip to content

Comments

Fixes for OpenJpeg/Jpeg2000#943

Closed
sergeyvfx wants to merge 0 commit intoAcademySoftwareFoundation:masterfrom
sergeyvfx:master
Closed

Fixes for OpenJpeg/Jpeg2000#943
sergeyvfx wants to merge 0 commit intoAcademySoftwareFoundation:masterfrom
sergeyvfx:master

Conversation

@sergeyvfx
Copy link
Contributor

First issue is rather simple, just missing search path for multiarch systems.

Second one is a bit more tricky, and it's related on the pre-multiplied (associated) alpha. As far as i concerned Jpeg2000 is expected to have straight alpha, so we need to premultiply (associate it) in order to deliver proper import result. Now it happens in the same exact way as what's happening in PNG importer.

Some code could be de-duplicated perhaps, but not really sure what's the best way to do this.

@sergeyvfx
Copy link
Contributor Author

On the further check, seems SGI and DDS reads are also to be updated in the same way.

@lgritz
Copy link
Collaborator

lgritz commented Aug 22, 2014

I haven't checked the other format specs yet, but just a quick glance at the SGI specs (ftp://ftp.sgi.com/graphics/grafica/sgiimage.html) I don't see where it says that it's unassociated alpha.

Can you point us to the places in the various specs that verify that these formats expect unassociated alpha?

@sergeyvfx
Copy link
Contributor Author

That's how Blender always used to treat alpha in any of the byte formats. This is being confirmed by Gimp. For the SGI i can also confirm this with gwenview.

The only thing so far is i'm getting some weird results with JP2K file in gwenview, but that might be because my current file does have an embedded color profile.

I've shared SGI and JP2K files i'm using there ftp://ftp.blender.org/sergey/bugreports/format_test/

For DDS it was more like a guess of where extra eye is needed, because we've got a report about alpha being treated in a wrong way and the code in there misses the alpha plremul as well. unfortunately, don't have way to save DDS here.

@sergeyvfx sergeyvfx closed this Mar 20, 2015
GerHobbelt pushed a commit to GerHobbelt/oiio that referenced this pull request Dec 10, 2024
…ion#943)

* CDL style

Signed-off-by: Bernard Lefebvre <bernard.lefebvre@autodesk.com>

* fix merge issue - new code needs to be adjusted to not use pystring

Signed-off-by: Bernard Lefebvre <bernard.lefebvre@autodesk.com>

Co-authored-by: Patrick Hodoul <patrickhodoul@gmail.com>
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 this pull request may close these issues.

2 participants