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

Menu commands

Menu commands

  • File
    • Save as. The command saves the recovered image under a new name.
    • Copy into clipboard. The command copies the current image to the clipboard as a 32-bit bitmap. The main purpose of The command is to copy the image to paste it then to an external application for automatic generation of content to fill empty spaces in the image.
    • Finish repairing. The command finishes recovery of the image and closes the editing window. The program keeps the restored image. Later, you can save the image using the Image > Save as command in the main menu.
  • Dump
    • Reload from selected byte. The command initiates reloading of the data starting from the selected byte in the Hex dump. Important! The data are reloaded starting from the MCU currently selected in the Image Preview panel and below. As a result, all the changes made to the image below the selected MCU will be replaced with the reloaded data.
    • Save position. The command allows saving the current position of the cursor in the Hex dump, like a bookmark. You can save up to five individual positions.
    • Goto position. The command moves the cursor in the Hex dump to a previously saved position.
  • Image
    • Channels. The command allows selecting the color channel to display in the Image preview area as a grayscale image. The Auto select option if enabled makes the program automatically display an individual channel during Manual color correction.
    • Zoom. The command allows you to zoom the image in and out. If you select Auto, the program automatically sets the zoom level so to make the image fit the area.
    • Show grid. The command triggers MCU grid on or off.
    • Show border line. The 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.
    • Show thumbnail. The command triggers display of the selected thumbnail in place of empty blocks.
  • Edit MCU
    • Reload from next/previous cluster/sector/byte/bit. This group of commands is for reloading data. A position in the file to reload the data from is calculated relative to the position of the current MCU, and depends on the type of the command. If a disk image is opened, the cluster and sector sizes are set according to that file system properties. Otherwise, if an arbitrary file is opened, they are set to the default size of 512 bytes. Important! The data are reloaded starting from the MCU currently selected in the Image Preview panel and below. As a result, all the changes made to the image below the selected MCU will be replaced with the reloaded data.
    • Reload from current MCU. The command initiates reloading of data starting from the currently selected MCU. The main purpose of The command is to undo mistakes.
    • Auto color. The command executes automatic color correction starting from the selected MCU.
    • Clear MCU. The command clears the selected MCU.
    • Delete MCU. The command removes the selected MCU and shifts the subsequent MCUs to the left by one position.
    • Delete previous MCU. The command deletes the previous MCU (relative to the selected one). The subsequent MCUs are shifted to the left by one position.
    • Delete line. The command removes the entire line of MCU blocks starting form the selected one. The subsequent MCUs are shifted up by one position.
    • Insert empty MCU. The command inserts one empty MCU at the position of the selected MCU. The subsequent MCUs are shifted to the right by one position.
    • Insert empty MCU to end of line. The command inserts empty MCUs starting from the selected MCU to the end of the line. The subsequent MCUs are shifted to the right by the corresponding number of positions.
    • Insert empty line. The command inserts the entire line of empty MCU blocks starting from the position of the selected MCU. The subsequent MCUs are shifted down by one position.
    • Centre selected MCU. The command scrolls the image so to put the selected MCU in the center of the Image preview area.
    • Show selected MCU after operation. If this option is enabled, the image is scrolled to make the selected MCU visible after every operation. You may want to disable this option, for instance, if you want to align the image by inserting empty MCUs and want to visually control the changes in some distant part of the image, far from the selected MCU.
    • Apply thumbnail. The command fills empty MCUs with graphical data from the thumbnail image. See more in the Use the thumbnail image to fill the empty MCUs section.
  • Thumbnail
    • Edit. The command opens the window where you can crop black bands of the thumbnail or change its orientation.
    • Position. The command displays the window where you can precisely adjust the position of the thumbnail relative to the main image.
    • Save as. The command saves the thumbnail as new file.
    • Add. The command allows adding a thumbnail from the list of all images found while opening the file.
    • Add from file. The command loads a thumbnail from a file.
    • Paste from clipboard. The command pastes a thumbnail from the clipboard.