MultiDrive – free backup, clone & wipe disk utility from Atola Technology

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 16 posts ] 
Author Message
 Post subject: JAR - JPEG Auto Repair
PostPosted: November 6th, 2026, 17:38 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 1227
Location: Nederland
What JAR does

JAR repairs JPEG photos that open, but look broken. When a few bytes of a photo go missing or get damaged, everything after that point goes wrong: the rest of the picture slides sideways, turns grey, or changes colour. The photo isn’t lost. The picture data is still there; it’s just out of place. JAR puts it back.

A JPEG is built from small tiles, stored one after another like text on a page. Damage knocks the tiles that follow out of line. JAR finds each spot where that happens, works out how far the picture moved, shifts it back and fixes the colour. It does this for every damaged spot in the photo, automatically.

Typical damage JAR repairs:

* the bottom part of the photo is grey or a single colour;
* the picture breaks into bands that are shifted sideways;
* from some point on, the colours are wrong (too pink, too green, too dark);
* photos recovered from a damaged card, USB stick or drive that look “glitched”, including photos recovered with PhotoRec, Recuva, Disk Drill and similar tools;
* photos with chunks of other data mixed in, or cut off at the end;
* photos whose header is damaged, using an intact photo from the same camera as a reference.

Attachment:
jar-before-after.gif
jar-before-after.gif [ 176.19 KiB | Viewed 3071 times ]


https://www.disktuna.com/jar-jpeg-auto-repair/

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 6:24 
Offline
User avatar

Joined: July 12th, 2010, 4:38
Posts: 1459
Location: Portugal
Top work.

_________________
http://www.pclab.com.pt facebook.com/PCLAB.A.T
ACELab partner


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 7:39 
Offline
User avatar

Joined: March 6th, 2010, 3:46
Posts: 628
Location: Kolding | Denmark
Really cool :good:

_________________
Digitalsupport Data Recovery
https://digitalsupport.dk


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 9:15 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 17380
Location: Australia
If I open an undamaged JPEG, I get this warning:

"The header says progressive JPEG (not supported). If this is damage ..."

Strangely, if I use HxD to fill one sector, in the middle of the file, with zeros, I see no damage in the corrupted JPEG. Perhaps progressive JPEGs should be the default for archiving?

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 10:01 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 17380
Location: Australia
Greyscale images don't seem to be handled well. I use this format for document scanning. The attached files include the results with both checkboxes ticked and unticked.


Attachments:
DG_instruction_set.7z [3.47 MiB]
Downloaded 49 times

_________________
A backup a day keeps DR away.
Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 10:06 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 1227
Location: Nederland
Then you were lucky I suppose, try zero a block 25% into the progressive file. Yes JAR suggests it could be damaged header. A JPEG straight from camera is probably damaged. So good header would fix it.

FF C0 - 1100 0000 - baseline
FF C2 - 1100 0010 - progressive

For robustness I suppose restart markers would be best with short interval.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 10:15 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 1227
Location: Nederland
fzabkar wrote:
Greyscale images don't seem to be handled well. I use this format for document scanning. The attached files include the results with both checkboxes ticked and unticked.


I will check this out, thanks!

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 10:18 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 1227
Location: Nederland
Found a bug. I fixed Huffman table that didn't need fixing.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 10:23 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 17380
Location: Australia
Arch Stanton wrote:
Then you were lucky I suppose, try zero a block 25% into the progressive file. Yes JAR suggests it could be damaged header. A JPEG straight from camera is probably damaged. So good header would fix it.

FF C0 - 1100 0000 - baseline
FF C2 - 1100 0010 - progressive

For robustness I suppose restart markers would be best with short interval.

I use progressive encoding as my default. This goes back to my dial-up modem days when images rendered very slowly in my browser. With progressive encoding you would see the full image at low resolution almost immediately.

Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000050                             FF C2 00 0B 08 06 DC
00000060  08 18 01 01 11 00

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 11:31 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 1227
Location: Nederland
Thank you, fixed this bug will upload later.

It will always do poor on files like these, it thinks there's gaps where there are none. Use assisted mode to get rid of the nonsense repairs.

https://youtu.be/4Cdwe8Shg1c

But it's on my list for later, thanks.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 12:26 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 17380
Location: Australia
I notice that after I cut a progressive JPEG in half, the half-file still displays without any visual errors in my image viewer. It seems that progressive JPEGs are very resilient to all sorts of damage, including bad sectors and partial recoveries via file carving in a fragmented file system.

Personally, I would like all my personal photos to be progressively encoded for this reason. Perhaps there would be some benefit in a standard-to-progressive conversion feature? I realise that your tool doesn't support progressive JPEGs, and perhaps progressive JPEGs are relatively rare, but would it be worth adding a feature to truncate the garbage at the end of progressive JPEGs that are the result of file carving?

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 7th, 2026, 20:15 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 17380
Location: Australia
The Analyse function occasionally finds false positives, even on good JPEGs. I have an inkling that these are most likely to occur where there are discontinuities. For example, dark text on a light background seems to trigger this behaviour, whereas landscapes seem to be immune.

BTW, I'm finding that progressive JPEGs are hard to break. Even when I delete an entire scan section (between FFDA markers), the image still has no visible damage. I even cut a JPEG in half and it still rendered OK.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 8th, 2026, 5:22 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 1227
Location: Nederland
Quote:
The Analyse function occasionally finds false positives, even on good JPEGs. I have an inkling that these are most likely to occur where there are discontinuities. For example, dark text on a light background seems to trigger this behaviour, whereas landscapes seem to be immune.


Spot on.

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 9th, 2026, 17:09 
Offline

Joined: November 24th, 2011, 21:48
Posts: 291
Location: Canada
Super cool Arch. Well done.


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: November 12th, 2026, 20:21 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 1227
Location: Nederland
WebClaw wrote:
Super cool Arch. Well done.


Thanks!

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
 Post subject: Re: JAR - JPEG Auto Repair
PostPosted: Today, 11:27 
Offline
User avatar

Joined: May 13th, 2019, 7:50
Posts: 1227
Location: Nederland
JAR - JPEG Auto Repair, build 276

What's new
- Faster: repairs of badly damaged photos is faster, up to 5 - 7 times.
- Better repairs of photos with stray sectors close together: the image data between them is kept where it belongs to the photo, and the colour after them comes out right more often.
- Photos written into the file more than once: JAR uses the last, most complete copy.
- When the data of another photo follows a damaged photo, JAR stops before it and can save that photo as a file of its own.
- Embedded preview as a last resort: when a photo can't be repaired, JAR can save the preview the camera stored inside the photo (Tools > Save embedded preview). HDR and depth maps that some phones store alongside the photo are not offered as a preview.
- Photos behind a foreign header: some repair tools put a header of their own in front of an intact photo, after which nothing can open it. JAR finds the photo behind it and offers to open that instead.
- Repeating damage: when the damage in a photo repeats at a fixed interval, JAR says so in the batch log and in the Byte map window. This is typical of a bad read of the memory card or chip (for example after chip-off); a new read may give a far better result than any repair.
- A stuck bit (faulty card reader or drive) is recognised and reported, instead of being mistaken for encryption.
- Files that contain no photo data at all (zeros, or one repeated byte) are reported as such.
- Tools > Structure: the markers of the file and what they say, with the problems found in the structure.
- RAW files without a usable JPEG: Tools > Byte map shows the RAW file itself, so you can see at a glance whether it is empty, zeroed or encrypted.
- Smooth scars now also handles damage two rows deep.
- Help > Check for a newer version: JAR checks only when you ask; it never goes online by itself.

JAR Pro
- Batch: choose any output folder, include subfolders, copy undamaged photos along, and pick up an interrupted run where it stopped. Repairs that may still show some banding go to a separate "check" folder. Photos that can't be repaired can get their embedded preview saved instead.
- Forensic mode: every repair gets a report with hashes, every byte removed, every operation, a map of what was filled, and checks anyone can repeat without JAR. The report starts with a plain-language summary for readers without a technical background.

Fixed
- Some photos with stray sectors close together were repaired worse than in older builds.
- Opening certain badly damaged files could make JAR stop responding.
- A RAW file without an embedded JPEG no longer leaves the previous photo on screen.

https://www.disktuna.com/?sdm_process_d ... d_id=10584

_________________
Joep - http://www.disktuna.com - video & photo repair & recovery service


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 84 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group