Alpha channel in JPEG's

Andreas Raab andreas.raab at gmx.de
Sun Jan 12 17:52:10 UTC 2003


Nevin,

JPEG does not support transparency at all. You can work around this by
using various techniques but "overlaying transparent JPEGs" will simply
not work (never has, and probably never will). Here are a few things
that can be done:
* Use PNG - it supports transparency (doesn't compress as well though)
* Use a separate image encoding the transparency as gray scale. In this
case you could use either GIF or PNG (for masks with very few alpha
levels) or even JPEG itself (for masks with very many alpha levels).
In any case don't expect anyone to "add transparency to JPEG". This
isn't even part of the spec.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Nevin Pratt
> Sent: Sunday, January 12, 2003 4:44 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: Alpha channel in JPEG's
> 
> 
> I'd like to load several JPEG's over top of each as a single 
> picture in 
> Squeak.  The first JPEG would contain no alpha channel (no 
> transparent 
> portion).  However, subsequent JPEG's would contain an alpha 
> channel for 
> the transparent portions of the picture.
> 
> It is for my wife's web site:  http://www.bountifulbaby.com, which is 
> driven by Squeak.
> 
> In short, I want to be able to load a base picture of a doll, 
> and then 
> overlay different hair, eyes, etc. over the base picture.
> 
> Can this be done within Squeak?  Where do I start?  Anybody got any 
> suggestions?
> 
> Thanks,
> 
> Nevin
> 
> 
> 




More information about the Squeak-dev mailing list