3 ms·
> what are the use cases for a lossy image with an alpha channel? Basically any image that's not flat and has a shape cut out of it (you can do this with CSS n
by cooper12 8y ago
> what are the use cases for a lossy image with an alpha channel?
Basically any image that's not flat and has a shape cut out of it (you can do this with CSS nowadays, but an alpha channel is cleaner and part of the image, allowing sharing/reuse). I personally would have loved it for old oval portraits for Wikipedia where I'd be able to make the background transparent. Currently, you have to use PNG which isn't lossy and doesn't lend itself to photographs.
- dahart 8y ago> Basically any image that's not flat and has a shape cut out of it My question was about lossy alpha specifically. I use alpha a lot, but I've never seen a production workflow that used lossy alpha. The alpha channel is more sensitive to compression artifacts because unlike a 3-channel sRGB image, you have no guarantees about how it gets used or what it's composited over. JPEG is designed with specific channel tolerances loosely based on the differences most humans can see in the red, green & blue channels. Since alpha applies to all channels of the background and foreground, you'd have to make extremely conservative choices with the compression. I'm not certain, but at first glance it appears to me that BPG with alpha has visible artifacts. When I look at the dice images here: https://bellard.org/bpg/gallery2.html https://bellard.org/bpg/gallery2.html the green one on the left has some severe banding in the edges where the one on the right is smoother.