views:

48

answers:

2

A JPEG image, if it is non-progrssive loads from top-to-bottom, and not from left-to-right or any other manner.

Doesn't that imply that jpeg uses some row-wise compression technique? Does it (use a row-wise compression technique)?

+5  A: 

No, it doesn't. JPEG mainly constitutes the use of chroma channel subsampling, a discrete cosine transform (DCT) and some non-lossy compression such as run-length encoding. The image is divided into blocks, usually 8x8 pixels, and then transformed into a frequency domain representation via DCT. In a non-progressive JPEG, these blocks would be stored left to right, top to bottom. With a progressive JPEG, the lower frequency components will be stored before the higher ones, allowing a low-resolution preview be viewed before the whole image has been transmitted.

Ezku
@Ezku: So, the compression happens at the block level and not at the image level. Is that true?
Lazer
@Lazer: That's the gist of it, yes. I'm not sure about the technicalities with chroma channel subsampling, because according to my knowledge of the transforms the subsampling could be done to the chroma channels either before splitting it to blocks or as a side effect of the DCT.
Ezku
A: 

As you can rotate a JPEG by 90 degrees quick and lossless I think it's not row-major compression. It's just that the compressed blocks are stored in some order and that happens to be row by row.

Peter G.