I have some experience in jpeg internals and I created a simple viewer for broken jpeg files. Maybe it will be interesting for somebody.
For example we have a broken jpeg and any standard viewer shows it partially
But this sample has a thumbnail (or several thumbnails) inside. My viewer knows many ways how thumbnails inside jpeg can be stored (about 20 variants include some proprietary) and my viewer shows the same sample as a mix of the main image and the thumbnail image with max dimension
The max thumbnail image I saw has dimension 1440x960 so sometimes resulting combined image can have a very good quality.
Nice. )
If I may, you could rename the thread to something *like*
New Viewer for broken jpeg images"
I read the current "Broken jpeg viewer" title as "Broken jpeg viewer" in the sense that someone was having a problem with a jpeg viewer that was broken. 😯
jaclaz
Very nice!
It even runs under Wine with no issues.
Not to complain about free dessert, but if you wouldn't mind a few observations based upon 5 minutes of testing.
The very first thing I think it needs should be easy, and that is a SAVE AS function for the reconstructed image. Other than screen capture, I didn't see a way to do this.
The other observation would be much harder and probably triple the effort of what you've already done which is very useful already. The reconstruction works great on the "End." That is, if I chop off the end of a jpeg to make it broken, it works great. If I take a chunk out of the middle, the reconstruction appears to be only on the end.
Again, very nicely done!
The very first thing I think it needs should be easy, and that is a SAVE AS function for the reconstructed image.
It is planned but some later. I want to implement lossless Save As operation, but it requests some additional investigations.
The reconstruction works great on the "End." That is, if I chop off the end of a jpeg to make it broken, it works great. If I take a chunk out of the middle, the reconstruction appears to be only on the end.
There is no way to automatically detect you case. IMHO the best solution for this scenario is a special repair tool with which you will be able to do all actions manually. It is requests a LOT of work to create such tool and I don`t have so many free time for free projects.
@Watcher
Side-side note, and don't want to derail the topic, but there is JFYI a mis-known (and actually very primitive) tool that in some cases works (with a lot of tries and providing often not a "proper" reconstruction) even when the corruption is near the beginning (but don't expect miracles)
http//
Jpeg-repair
by Wim VanMaele
jaclaz
Our company offers JPEG repair service for files affected by bad sectors after imaging https://
It won't help with an image that's half grey at the bottom (such as that one the OP posted) since that means the lower half of the data is just missing, but it will help where it's a case of only some bad sectors and the image has a lot of discoloration, shifts, etc. We simply remove the bad compressed blocks and fill them in with empty placeholders, then fix the color stream.
For people who just want to see their family photos, we'll then fill in the gaps with approximated data. However, for a forensic case, we'd just leave the empty blocks so you'd see some gray lines of empty picture.
The max thumbnail image I saw has dimension 1440x960 so sometimes resulting combined image can have a very good quality.
Nice.
From a forensic perspective, however, I think it need to be clearer that a restoration has taken place, and what part (or parts) have been restored. This would be particularly important for a 'save as' operation.
On the other hand, I don't know that's the direction you want to take it – i.e. forensic tool.
I think it need to be clearer that a restoration has taken place, and what part (or parts) have been restored.
There is already this info in the second screenshot in the caption of the window 49% of the original image and 51% of the restored.
A
If you have jpg images with damages - I am ready to help to restore them (for free).
The very first thing I think it needs should be easy, and that is a SAVE AS function for the reconstructed image. Other than screen capture, I didn't see a way to do this.
New version of my jpeg viewer is ready. Now you can save the resulting image as a new jpeg file.
Another useful feature - the program knows about 20 ways to store and encode thumbnails inside jpeg files and allows you to extract them. In