- Joined
- Dec 28, 2005
- Messages
- 11,460
- Likes received
- 1,218
- Thanks received
- 233
- Location
- European Union (Yorkshire)
The only real solution is to combine lossy JPEG storage of the image
with lossless storage of a transparency mask using some other algorithm.
Developing, standardizing, and popularizing a file format capable of
doing that is not a small task. As far as I know, no serious work is
being done on it; transparency doesn't seem worth that much effort.[/COLOR]"
I've done that. I had something that stored the colour channel in JPEG format, and an 8-bit alpha channel in a lossless format. Because alpha channels typically have long sections fully off, followed by long sections fully on, with perhaps a bit of blending at the edges, they compress really well with RLE. It means the overhead of storing an alpha channel in this way is typically very small.
I think Flash can do exactly that as well.
iirc, GIF isn't lossy. RLE
Yes, but it's 256 colours. If you convert a photograph to a GIF, it has to reduce it to 256-colours, which means it effectively is lossy compression, and loses a lot of quality as a result.
GIFs only really work when you have very simple blocks of solid colour, as then you can maintain quality and RLE works well. Any graduated fills, or anti-aliased edges, or blur effects, and things tend to go to hell very quickly. And to get any half way acceptable quality you have to dither the image, which stops RLE working at all, and breaks down completely if you ever try to resize the image.