Why can’t JPEGS be transparent?

406 views

Why can’t JPEGS be transparent?

In: 1537

19 Answers

Anonymous 0 Comments

Because the image format doesn’t support it.
In order for an image to be transparent you need to encode in the image how transparent it should be. That is, for each pixel, in addition to knowing the red, green and blue values, we also need to know “how transparent is it”. That’s commonly referred to as “alpha”, and so the image has to store RGBA (or ARGB) pixels, rather than just RGB.

JPEG doesn’t do that. It only stores three color channels, red, green and blue. The image format doesn’t give us a way to specify how transparent each pixel should be.

(Edit: As many commenters have pointed out, JPEG images *don’t* actually store red/green/blue information — and for that matter, it also doesn’t store values for each distinct pixel. They store other information which can be used to work out red/green/blue values for each pixel)

You are viewing 1 out of 19 answers, click here to view all answers.