Alpha jxr generated not readable by flash?



First of all thank you for this library, that is the only one I could compile and make it to work.

I am currently trying to compress our bitmap assets and jpeg-xr is currently our best option.

We have a 32 bit transparent png that we convert to tif via gimp
Then we process it via your JxrEncApp using the following command:
"./JxrEncApp -v -Q 128 -q 0.5 -a 2 -i textureData.tiff -o textureData_jxrlib.jxr "

The compression is amazing but the adobe flash player (version 11) is not able to read the alpha channel and interpret thus the image as a non-alpha bitmap.

Note : gimp is able to read the alpha channel and I can see the resulting bitmap in it.

Might there be some non-standard stuff in your library ?

Thank you


christoph_hausner wrote May 30, 2014 at 8:17 PM

I'd assume that this is a limitation or bug in Flash Player. I am not sure which library they are using for JPEG XR decoding but it definitely isn't jxrlib as that was only published later. There are some comments here from someone having the same or similiar issue, without any solution though.

You're writing that interleaved alpha is loading fine in Flash Player. I guess that's the best workaround.

christoph_hausner wrote May 30, 2014 at 8:53 PM

I could reproduce it here. jxrlib seems to write files differently than older encoders (like wmpencapp or the WIC encoder) because older HD Photo images load correctly.

christoph_hausner wrote Jul 5, 2014 at 6:28 PM

Turns out this is actually a bug in jxrlib. It has been fixed in MSOpenTech's fork and I assume the changes are soon pulled into the main repository.