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

Repair window

To bring up the Repair window, use the Image > Repair main menu command.

The Repair window looks as follows:

JpegMedic Repair window

The window consists of the follow areas:

  1. Menu

    Contains editing commands and repair tools.

  2. Cluster list

    This area is similar to the cluster view in the main window. The list of clusters is filled automatically when you open a disk image or an individual JPEG file. The list of clusters can be used to recover a consistent JPEG file that became fragmented while saving to the storage. Normally, fragmented files open without problems, because the file system provides all the necessary information about what cluster each part of the file occupies. But if the file system is damaged, the recovery of this information is not possible anymore, and the fragmentation becomes a real issue.

  3. Current MCU offset selection

    This part of the Repair window allows you to adjust the offset of the current MCU. The current offset is displayed as AAAAAAAA:B, where AAAAAAAA is the offset in bytes from the beginning of the JPEG bit stream, and B is the offset in bits within the current byte.

  4. Hex dump

    This area displays the hex dump of the current JPEG stream and also the first byte of the MCU being edited.

  5. Color correction

    This area allows you to correct DC coefficients of the current MCUs. The Auto color button allows you to adjust colors automatically.

  6. Image preview

    Displays the image being repaired. The preview area contains the cursor. This cursor indicates the selected MCU. You can select a specific MCU with mouse or arrow key on your keyboard. Home and End buttons move the cursor to the beginning and the end of a line, respectively. Pressing Ctrl+Home and Ctrl+End moves the cursor to the beginning and the end of the current continuous block, respectively.

    For more convenient editing and viewing the image, you can use the Image > Zoom menu command.

    Use Image > Show grid to display or hide the MCU grid.

    The Image > Show borderline command triggers display of the border indicating the real size of the image. This option is useful when you need to estimate the real dimensions of the image, if the decoding data are damaged or only the upper part of the image is visible.

    The Image > Show thumbnail menu command triggers display of the selected thumbnail in place of empty blocks.

  7. Thumbnail list

    Displays the preview of the final image, and also allows you to select a thumbnail image to fill empty MCUs.

  8. Status panel

    The status panel displays information about the image, left to right:

    • Image dimensions in pixels
    • Image dimensions in MCU
    • Currently selected MCU
    • Color space of the image. You can right-click this area to bring up the menu, where you can select the color channel to display in the Image preview area as a grayscale image. JpegMedic Repair window channel menu
    • Zoom level of the image in the Image preview area, in percents. You can right-click this area to bring up the menu where you can choose the desired zoom level. JpegMedic Repair window zoom menu