• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Image Files

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.
 
What about vector formats? There's Flash that everybody has, but that's a bit overkill for one image. And then there's SVG, which I don't think anybody has ever used ever outside of a standards committee ;-) Are there any other vector formats you could use that the common browsers would support natively?

Does anybody have an answer for that, as I'd be quite interested to know?
 

Advertisers

Back
Top