Is there a lib which support .jpeg file with "RGBA" mode?
fredrik at pythonware.com
Tue Dec 16 11:08:51 CET 2003
Peter Hansen wrote:
> google12 wrote:
> > Ann... I had tried to use Photoshop 7 to save a .png file with transparency
> > as a .jpg file, and the transparency will be kept in the .jpg file.
> If JPEG doesn't support transparency, then clearly that couldn't have happened,
> or Photoshop uses a non-standard JPEG format.
> Perhaps Photoshop "transparently" (no pun intended) saves the alpha data
> to some other location, but magically restores it when you reload the .jpg?
JPEG supports application-defined data segments ("app markers"), so Photoshop
may simply pack the alpha layer using a suitable lossless compression (predictor
plus zip?) and embed it inside the JPEG stream.
or they may ignore that fact that using lossy compression for alpha layers isn't
really a good idea...
if anyone can mail me a sample (or better, post a sample somewhere, and mail
me an URL), I can look into it.
More information about the Python-list