Lazer
Lazer

Reputation: 94820

Does JPEG use a row-major compression algorithm?

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)?

Upvotes: 1

Views: 296

Answers (2)

Ezku
Ezku

Reputation: 622

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.

Upvotes: 6

Peter G.
Peter G.

Reputation: 15114

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.

Upvotes: 0

Related Questions