Recent changes to JPEG-Repair Toolkit

By | May 27, 2020

2.8.191 – Jan 1, 2022 update

# Had to reset expiration date of JPGRepair.exe.

2.8.189 – Nov 1 update

# JPEG-Repair, MCU editor resizable, re-worked file save mechanism to get rid of clutter of files produced during repair.

# Updated URL to check latest version, it was pointing to dead URL.

# Removed preview from source file selection; rationale is that corrupt files fail to render most of time and can even hang the dialog (which is why rendering was disabled by default).

# Fixed bug with up/down/left/right keys.

2.8.164 – Oct 31 update

Brings JpegDigger to version 2.6.294

# JpegDigger only minor fixes.

# JPEG-Repair, added MCU based adjustment window that allows for tweaking image and color shift.

# JPEG-Repair, added omit option in file selection dialog, can be used to skip number of bytes in source file. For example, number of encrypted bytes in STOP/DJVU ransomware affected files is known (153605 bytes), we can tell JPEG-Repair to omit this portion of the file. Since STOP/DJVU is wide spread and common, double clicking text box will autofill this value.

2.8.110 – May 3 update

Brings JpegDigger to version 2.6.280

# Fixes bug that made JpegDigger miss JPEGs embedded inside RAW photos.

# Improvements to automatic block size detection.

# Fixes progress bar flicker

# Adds ‘drive passport’ option in physical drive selection window: JpegDigger will try to detect drive model and serial number using various methods (API, ATA passthrough, SCSI passthrough).

2.8.110 – April 23 update

Emergency update! Latest Windows update breaks some visual components in both JPEG-Repair and JpegDigger. JPEG-Repair only modest changes.

Brings JpegDigger to version 2.6.228

# Fixes bug in disk image file selection window

Drive/folder change wasn’t handled.

# Detects duplicates

JpegDigger keeps list of file hashes to detect duplicates. JpegDigger tries to detect duplicate files (default behavior), these will not be added to file list or saved when autosave is active.

# YKUSH now implemented and control exe included in download.

# Fixes bug that caused error while scanning end of drive

# Adds option to select physical drives in format \\.\PhysicalDrive(n).

Windows may fail to assign drive letter to problematic devices. Also with problematic devices that constantly ‘drop’, Windows needs to re-assign drive letter every time device is disconnected/reconnected or power cycled, in those cases working with the physical device is advised.

# Some tweaks in corrupt file detection.


Emergency update! Latest Windows update breaks some visual components in both JPEG-Repair and JpegDigger. JPEG-Repair only modest changes.

Brings JpegDigger to version 2.6.163

# Fixes bug in disk image file selection window

Drive/folder change wasn’t handled.

# Detects duplicates

JpegDigger tries to detect duplicate files (default behavior), these will not be added to file list or saved when autosave is active.

# YKUSH now implemented and control exe included in download.


# Adds MCU clone tool

To repair a JPEG you typically need to remove corrupt data which affects alignment of all data following corruption. To re-align you then insert stuff bytes (zeros) which leave a grey horizontal line. In this video I show how I use MCUs directly above the grey line to replace the stuff bytes.

# File selection dialog ‘show all files added’.

Brings JpegDigger to version 2.6.121

# adds ability to load disk images. Only RAW images supported.

# adds ability to create a RAW disk image. Testing is limited to memory cards and USB flash drives I have at my disposal. I have tried to make it as robust as possible, also when dealing with unstable memory cards and flash drives, example

# Manual reconstruction of a corrupt non contiguous file requires less clicks: add option to auto render, so resulting image is loaded as soon as you select or deselect clusters.

# May feel slower as I was too optimistic in previous build with discarding blocks of data, resulting in the tool missing potentially recoverable data.


# I removed and changed code that might upset virus scanners because that’s becoming a bit of a plague.

Various virus scanners have been flagging my tools as trojan lately, I must stress these are false positives. JPEG-Repair and JpegDigger do what they’re intended for, repair and recover digital images. They do not leave traces on your system, don’t call home or anything of the sorts.

These detections are ‘heuristic’ Some AV vendors refer to it as ‘AI’ that supposedly learns how malware behaves and what it looks like. So the scanner does not actually and factually find a virus, but ‘thinks’ the program might contain some harmful code. Sometimes this is based on for example readable strings in the compiled program. So for example there is code in the program that deals with handling the registration key. Certain variable names may resemble code in ransomware software as both deal with hashing and encryption. And indeed, something simple changing names of such variables to something more neutral, lowers detection rates.

It is kind of ridiculous that I have to put so much time and work into this because they get it wrong.

If your AV software complains about JPEG-Repair or JpegDigger, please submit them to the AV software vendor for analysis.

# Brings JpegDigger to version 2.6.48. I have been bug hunting to try to pin point and solve some perky bugs that show up lately; hang while scanning, hang while copying and error 13 messages. Thing is I can’t reproduce them, which makes them hard to trouble shoot.


# I removed bunch of code related to detection of encoding, encryption etc. of data. There are no functional changes.

Purpose of the drill is to get rid of any code that may trigger false positives from AV security products which are a plague lately. JPEG-Repair and JpegDigger are both clean. I try to be as open as possible, the software does not install, modify registry, phone home or any of that. But lately AV vendors frequently started flagging both tools as possible malware, or trojan or whatever. These are false detections!

# Brings JpegDigger to version 2.6.26 (misc fixes and ads RAF detection)


# Adds cross hair to magnifier.

Requested by users. As the image magnifier shows goes through various conversions the cross hair may be off under conditions, so I also added the option to calibrate: double click magnifier to launch calibration window.

# Brings JpegDigger to version 2.6.14

Various features added, deepscan, CR3 RAW file detection and a virtual cluster viewer/editor which allows for manual file defrag during recovery.


# Adds truncate option to accommodate repair of STOP/Djvu family ransomware affected RAW photos

RAW files are typically 20 MB or larger. JPEG-Repair ignores FF D9 marker then ‘append’ header feature is used which implies it will treat the full size of the RAW as JPEG data. Program will feel slow because all this data is processed. New truncate feature will cut file at point up to where pseudo decoder came which is normally the end of JPEG data.

# ZIP includes latest JpegDigger (2.5.93)


# Fixes loop where cancel button didn’t do anything

JPEG-Repair can encounter a situation where it keeps reloading the damaged file in patch mode, it was not possible to cancel out of that.


# Due to an influx in STOP Djvu related cases this version adds an extra option to the append feature:

Append takes the header of a reference file and ‘glues’ it to the corrupt file. The new option allows you to select a number of bytes from bitstream of reference file to be inserted before data from corrupt file (this was a fixed number, 4096 bytes). This allows for greater flexibility for getting for playing with color and brightness. It also helps if reference file is visually similar to the corrupt file.


# Mostly usability, as I am probably the one who uses JPEG-Repair the most I removed some stuff that I actually never used.

# Magnifier, I want it to be able to watch it next to mouse pointer: Left click to make it so. Release and it will snap back in it’s original position.

# I also do a lot of saving and file loading for example because JPEG-Repair removes invalid markers and such so I made it batch this. When opening a corrupt file it may now automatically save and open files a few times.

# I also added save/reload option, saves current state and reloads the saved file. In effect creates an undo option.

# Enable align option removed. Current mechanism is, if value for bytes to add > 0 then it’s enabled.

# Bytes removed value no longer copied to bytes to align value. If you wish to copy the value however, simply double click bytes to add value.

# Double click byte address to jump to first byte in scan data.

# As modifying resolution is in fact patching I moved it to the editor area.

# Some modifications to append option based on experiences repairing ransomware encrypted JPEG’s.

# Bug fixes.

Version 2.8.24

# Adds decoder support for restart markers

Decoding may fail however with severely corrupted JPEGs in which case editor is disabled.

# Removed automatic byte address autofill as result of a decoder error

Decoder may fail only after some time corrupt data was introduced in stream. JPEG-Repair automatically selecting fail byte address results in user removing corrupt data from the point while corrupt data that preceeds that point remains. So user now has to click image to select point from which corrupt data is to be removed. I feel it’s more consistent and more correct. My strategy is always to click slightly before visual corruption to make sure all corrupt data is actually removed.

# Decoder speed improved (2 – 2.5 times faster)

Did some optimizations in pseudo decoder. I was still decoding data I never actually used.

# Fixed issue with magnifier and portrait mode images

Lower part of portrait oriented images could not be selected by clicking the image. Took me a while to figure out, but is fixed now.

# Default for ‘show preview’ in browser for corrupt files is now Disabled.

I got too man reports where JPEG-Repair would hang when selecting corrupt files. Reason for this was the image viewing component I use would hang trying to decode the corrupt file.

# Name change: Was JPEG-Repair Toolkit, is now JPEG-Repair

In the future I will refer to JPEG-repair AND JpegDigger as JPEG-Repair Toolkit. Stand alone tool will be referred to as JPEG-Repair. I will at some point offer the JPEG-Repair Toolkit which includes JPEG-Repair and JpegDigger, and JPEG-Repair and JpegDigger as stand alone tools.

# Provisions to accommodate future license models

See previous point.

# Download now includes JpegDigger


Changes to JPEG- Repair from version 2 >

I feel quite confident in saying, that IF a file is repairable (so, contains JPEG data + we have reference header), JPEG-Repair Toolkit can help you do it. So if you need to fix corrupted photos, you may want to give it a try.

2.5.91: Most work went into GUI, program flow. Goal was to make JPEG-Repair more user friendly. Several components moved to places to where they’re needed rather than just sitting in the main screen. Magnifier now has a fixed position (no longer needed to click the mouse).


2.5.23: fixed typos, reference file dialog parses EXIF info from donor file, added no preview option to open file dialogs to prevent lockups with severely corrupted files.

JPEG-Repair now parses EXIF data from reference files.

JPEG-Repair now parses EXIF data from reference files.

Pre 2.5.23>>

  • MCU aware pseudo JPEG decoder with (decoding) error detection
  • Improved navigation through image using image view (up/down line of MCUs, up/down MCU)
  • JPEG preview in file browser
  • Resolution override settings (to fix corruption like this)
  • Patch now sort of guides you through first repairs, repair invalid markers and prompt to load repaired file
  • No longer needed to copy to folder with corrupt files and rename reference file to sample.jpg. You will be prompted to select a reference file.
  • Append option: Appends selected JPEG header to any file, so cool!
  • Error report window, fired if repair fails or encountered errors
  • RGB info added to magnifier which I find to be useful for images where it is difficult to visually match colors in different areas.
  • Changed nagging dialog in trial, less pop-ups, trial must be usable to some degree
  • Changed trial limitations in PATCH mode: Now possible to go through several iterations of file repair.

Append option is particularly powerful! Check video for an example, none of the competing tools (Stellar, HetMan, PixRecovery, Picture Doctor, JPEG Recovery Pro) is able to repair images like these. Apart from example in video several others (more interesting pictures) were fixed using this method.

These are the different stages:

  1. Basically the file is binary blob with no recognizable JPEG structures. However entropy suggests JPEG data. JPEG Header is glued to file.
  2. After JPEG header is glued to file and data was stripped from byte combinations that upset photo viewers (JPEG decoders).
  3. About 1/6th of total data in file was cut to get us at stage 3. Just tiny amount of corruption + overriding header width/height settings + cropping end of file gets us:
  4. Almost final file. Image is copied to Windows clipboard and further cropped and color corrected using PhotoDemon.

Thanks to append option we can virtually repair any JPEG, as long as it contains JPEG data and we have a suitable donor/reference file.

Various improvements and bug-fixes in PhotoHeal companion app.

  • Filename is automatically generated for images pasted from clipboard
  • Added preview in file/open save dialog
  • Fixed bug with scrollbars

Leave a Reply

Your email address will not be published. Required fields are marked *