JPEG Medic // Accurate Manual JPEG Recovery
Table of Contents
  1. Overview
  2. Theory of JPEG Repair
    1. JPEG structure
    2. How to fix broken JPEG file
  3. Working with the Program
    1. Main menu
    2. Virtual folder tree
    3. Files panel
    4. Preview panel
    5. Cluster view
    6. Hex view
  4. Repairing JPEG image
    1. Opening JPEG file
    2. Repair window
      1. Menu commands
    3. Repair procedure
      1. Visual analysis and localization of damaged MCUs
      2. Finding the next correct MCU
      3. Deleting damaged MCUs
      4. Inserting empty MCUs
      5. Color correction
        1. Automatic color correction
        2. Manual color correction
      6. Filling empty MCUs with data
        1. Use the thumbnail image to fill the empty MCUs
        2. Auto-generate missing content
    4. Saving repaired JPEG image
    5. Repairing fragmented JPEG file
    6. Repairing damaged JPEG image based on SOS marker
    7. Repairing JPEG file encoded by ransomware

Repairing fragmented JPEG file

Sometimes the JPEG image won't open and display after extraction from the disk image because the file is fragmented. That is, in place of the JPEG bit stream expected by the decoder there is some other data that prevents decoding of the remaining part of the image.

In this case you can try to eliminate damages by excluding fragmentation. To do this, turn off particular clusters in the Cluster list (the leftmost area of the Repair window) from the stream.

Select the damaged MCU in the Preview area. The selection automatically selects the corresponding cluster in the Cluster list.

Fragmented jpeg

When you move the cursor in the preview area, it also moves in the Cluster list. When you switch the focus to the Cluster list, you can select and deselect clusters by pressing Space. The cursor moves to the next cluster then, and the program recalculates the image data without the given cluster. Pressing the Space button again, will turn the cluster on.

This way, by selecting and deselecting clusters and tracking visual changes on the image, you can gradually restore the original image.

Fixed fragmented jpeg

Video demonstration: