#167 Saving to JP2 with Alpha Mask produces unreadable files

open
Hervé Drolon
None
5
2012-10-31
2011-02-14
Ken Schafer
No

Using the Delphi wrappers and Delphi 2010, I loaded a PNG then saved it to a file stream using

SaveToStream(FIF_JP2, fsJP2);

I then also saved it as as PNG as a test with

SaveToStream(FIF_PNG, fsPNG);

The JP2 is ONLY readable by QuickTime, and it shows it without an alpha channel; iFranView fails to open it with a decoding error, and other programs can't read it as well.

Discussion

  • Ken Schafer
    Ken Schafer
    2011-02-14

    I have a sample posted at:

    http://www.frameforge3d.com/downloads/jp2-save-samples.zip

    This contains the source PNG with Alpha and the unreadable JP2.

    Note, although I did say that QuickTime can read it, it does so without the Alpha mask.

     
  • I'd love to see this fixed as well. For the Unity game engine, we need a cross platform way to write icon files for OS X executables. Apple chose JP2 with alpha for their icon format for icons larger then 128x128, so we are currently limited to the obsolete 128x128 icon size.