1
Vote

writes non-standard files

description

Hi,

You mentioned in the readme that the file generated cannot be opened in some application when using alpha channel.

I can confirm that on flash player 11. Is there any plan to fix it?
Where is the issue ? in the gimp plugin or in the jxrlib library ?

Thank you

file attachments

comments

christoph_hausner wrote May 29, 2014 at 12:11 PM

ronan7,

it's a bug in the plugin, not in jxrlib. Currently, images with an alpha channel are saved in 32bppRGBA format which is a valid pixel format for in-memory data but invalid for jxr files. 32bppBGRA is what should be used here. Fixing this in the source should be easy but testing and packaging for release would take some time.

There is a workaround that may be helpful in the short-term and involves editing files with an hex editor. I can give instructions if you're interested.

Actually I was working on a new version of this plugin for GIMP 2.10 with HDR format support, metadata and other goodness but it's currently on hold because I am busy and 2.10 is not out yet anyway. I can send you a preliminary version if you happen to use the 2.10 development version or are willing to upgrade.

ronan7 wrote May 29, 2014 at 2:18 PM

Hi Christoph

I compiled your plugin from source so if you could give me a patch (or commit to the git repo) (not sure what to change) that would be perfect

Cheers

christoph_hausner wrote May 29, 2014 at 4:37 PM

Okay try the patch that I attached. Unfortenuately I am unable to test it right now. Let me know if you can load and save files correctly.

ronan7 wrote May 30, 2014 at 10:12 AM

cool thanks, it compile and works.
Unfortunately Flash Player does not seem to support plannar alpha (I tried the otpion using the JxrAppEnc command line tool and whenever I used plannar alpha the Flash Player would display the image without alpha channel). Could there be an option in your plugin to set alpha to be interleaved when alpha quality is set to 100%?
Thanks again

christoph_hausner wrote May 30, 2014 at 6:41 PM

That is weird if Flash Player does not support that. In that case it may be indeed a good idea to add an option to switch to interleaved in the settings dialog. The drawback with interleaved alpha is that you can no longer specify a separate quantization value for the alpha channel.

You can change the "2" to a "3" in line 344 in save.c to force interleaved alpha. Let me know if that works for you.