Fixes for OpenJpeg/Jpeg2000#943
Fixes for OpenJpeg/Jpeg2000#943sergeyvfx wants to merge 0 commit intoAcademySoftwareFoundation:masterfrom
Conversation
|
On the further check, seems SGI and DDS reads are also to be updated in the same way. |
|
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? |
|
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. |
…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>
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.