Table of Contents
|
JPEG structureDamaged JPEG files can be recovered using certain methods. The repair possibility directly follows from the structure of a JPEG file. JPEG is a compressed image format. Simply put, every JPEG file consists of two parts. The first part contains special tables and metadata that describe how the compressed data should be decoded. The second part contains the compressed data. The compressed data consists of series of Minimum Coded Units or MCU. Such an MCU is a compressed tile of a fixed size, specifically, 8x8, 16x16, 16x8, or 8x16 pixels. The entire image is built from such tiles. It is the fact that JPEG is constructed from such MCU "bricks" that makes it possible to repair damaged images. Important specific of MCUs is that they are not aligned to the byte size, that is, each MCU can start and end at any given bit in the file. Hence, often a JPEG file looks damaged just because a decoder starts reading MCUs from an incorrect bit position. And while most image viewers will not be able to correctly display such a file, in fact repairing a JPEG with such type of damage is just a matter of seconds. Another common problem is a damaged or lost MCU. Since each MCU independently encodes one chunk of the original image, even if a number of MCU blocks are lost that typically does not mean that all other parts of the image are lost as well. |