Corrupt jpegs, thumbnail extracted...
Moderators: XnTriq, helmut, xnview
Corrupt jpegs, thumbnail extracted...
hi!
I was wondering if anyone can help me?
Recently we had a hard drive crash and we lost everything, and no, we didn't back up - Lesson learnt.
Photos are the only thing I'm after. The main image is corrupt and I am in the process of extracting the thumbnails.
So....
Is there anyway I can make the thumbnail image bigger, without the image becoming blurred?
Or is there a way to rebuild from a thumbnail?
Many thanks in advance for any replys and I will put my hand up to not knowing alot about this at all! Just desperate to have pictures of my daughter.
I was wondering if anyone can help me?
Recently we had a hard drive crash and we lost everything, and no, we didn't back up - Lesson learnt.
Photos are the only thing I'm after. The main image is corrupt and I am in the process of extracting the thumbnails.
So....
Is there anyway I can make the thumbnail image bigger, without the image becoming blurred?
Or is there a way to rebuild from a thumbnail?
Many thanks in advance for any replys and I will put my hand up to not knowing alot about this at all! Just desperate to have pictures of my daughter.
-
- Moderator & Librarian
- Posts: 6402
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: HELP corrupt jpegs, thumbnail extracted...
Hello conkers
Unfortunately I've got more questions than answers for you at this point:
Unfortunately I've got more questions than answers for you at this point:
- When you say “the main image” you mean the original full-resolution photos, correct?
- Where are you “extracting the thumbnails” from? From XnView's cache (XnView.db)?
- What kind of attempts have been made to recover the data from the crashed hard drive?
- Were these photos scanned in or were they transferred from the flash memory card of a digital camera?
Well, there's software specialized in upscaling small images, but these programs can't restore lost detail:conkers wrote:Is there anyway I can make the thumbnail image bigger, without the image becoming blurred?
Or is there a way to rebuild from a thumbnail?
- Alien Skin: Blow Up
- Bearded Frog: Enlarger PRO
- onOne: Genuine Fractals
- MeeSoft: Image Analyzer + Fractal interpolation
- Kneson: Imagener (p/k/a ZSpline)
- Nikola Dachev: ImageScaler
- Giovanni Brembati: PhotoResampling
- BenVista: PhotoZoom Pro (p/k/a S-Spline)
- Extensis: pxl SmartScale
- ddisoftware: Qimage
- Vlad Hosu: Reshade
- Brian Spangler: ResizeIT
- Fred Miranda: Resize Pro
- Peter Werner: Resizor
- Dr. Steven A. Ruzinsky: SAR Image Processor
- FixerLabs: SizeFixer
- STOIK Imaging: Smart Resizer
- Mischa Lusteck: SmillaEnlarger
- HumanSoftware: XFile
- Mehdi: Zoom Engine
- PhotoRec to recover lost pictures
- Info about Resampling algorithms
- a picture problem for help
- Help with img cache
- Extracting original images from a slideshow exe-file?
- Photos devenues invisibles
- Extracting thumbnail from XnView.db
- JPEGsnoop — JPEG File Decoding Utility
- Extract Image from Xnview.db
- XnView 1.94 Recreate EXIF Thumbnail corrupted photos
Last edited by XnTriq on Thu Aug 28, 2008 2:00 am, edited 1 time in total.
Many thanks for replying
In answer for your questions...
1. Yes I do mean the full resolution photos
2. err... as I said I'm very new to all this... I have been using Jpeg Snoop to extract the thumbnails..?? Is that right?!
3. We have/had 2 hard drives. They are/were Raid 0. Data was banded across both drives. We had a head crash and the blue screen of death. We sent off the drives to a data recovery agency (2 actually to get a second opinion) The drive which had the head crash is unreadable. What we have back is photos that are corrupt - grey banding, colour distortion etc. BUT we do have SOME phtos with thumbnails and also alot of photos which we can't even open at all.
4. Transferred from a digital camera, I have also attempted to rescue photos from the memory stick, and I have got a few off it, but it was written over time and time again.
I think that answers them!
Once again many thanks in replying.
I'm completly new to all this, I'm just a desperate mum that wants to find anyway of having a some photos of my daughter. So I'm sorry I don't know what I'm talking about!!
In answer for your questions...
1. Yes I do mean the full resolution photos
2. err... as I said I'm very new to all this... I have been using Jpeg Snoop to extract the thumbnails..?? Is that right?!
3. We have/had 2 hard drives. They are/were Raid 0. Data was banded across both drives. We had a head crash and the blue screen of death. We sent off the drives to a data recovery agency (2 actually to get a second opinion) The drive which had the head crash is unreadable. What we have back is photos that are corrupt - grey banding, colour distortion etc. BUT we do have SOME phtos with thumbnails and also alot of photos which we can't even open at all.
4. Transferred from a digital camera, I have also attempted to rescue photos from the memory stick, and I have got a few off it, but it was written over time and time again.
I think that answers them!
Once again many thanks in replying.
I'm completly new to all this, I'm just a desperate mum that wants to find anyway of having a some photos of my daughter. So I'm sorry I don't know what I'm talking about!!
-
- Moderator & Librarian
- Posts: 6402
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Sorry for the delay.
Now that all of my questions have been answered perfectly, we know where we stand.
I know of at least two free programs which enable you to extract the EXIF thumbnails in batch mode: Too bad that both jHead and ExifTool are command line driven, meaning they do not come with a GUI (graphical user interface) front end out of the box.
Why so modest? Either you're a fast learner or you're not such a newbie as you claim to be.conkers wrote:I'm completly new to all this, I'm just a desperate mum that wants to find anyway of having a some photos of my daughter. So I'm sorry I don't know what I'm talking about!!
Obviously, you've done your homework.conkers wrote:3. We have/had 2 hard drives. They are/were Raid 0. Data was banded across both drives. We had a head crash and the blue screen of death. We sent off the drives to a data recovery agency (2 actually to get a second opinion) The drive which had the head crash is unreadable. What we have back is photos that are corrupt - grey banding, colour distortion etc. BUT we do have SOME phtos with thumbnails and also alot of photos which we can't even open at all.
4. Transferred from a digital camera, I have also attempted to rescue photos from the memory stick, and I have got a few off it, but it was written over time and time again.
Now that all of my questions have been answered perfectly, we know where we stand.
JPEGsnoop is great for analysing or even fixing corrupt photos, but “manually” pulling out embedded previews from dozens of JPEGs would be a tedious job.conkers wrote:2. err... as I said I'm very new to all this... I have been using Jpeg Snoop to extract the thumbnails..?? Is that right?!
I know of at least two free programs which enable you to extract the EXIF thumbnails in batch mode: Too bad that both jHead and ExifTool are command line driven, meaning they do not come with a GUI (graphical user interface) front end out of the box.
jHead Usage documentation » [url=http://www.sentex.net/~mwandel/jhead/usage.html]Thumbnail manipulation options[/url] wrote:-st <name>
Save the built in thumbnail from Jpegs that came from a digital camera. The thumbnail lives inside the Exif header, and is a very low-res JPEG image. Note that making any changes to a photo, except for with some programs, generally wipes out the Exif header and with it the thumbnail.
I implemented this option because I kept getting asked about having such an option. I don't consider the built in thumbnails to be all that useful - too low res. However, now you can see for yourself. I always generate my thumbnails using ImageMagick (see end of this page).
Like the '-te' option, this feature has the 'relative path' option for specifying the thumbnail name. Whenever the <name> contains the characters '&i', jhead will substitute the original filename for this name. This allows creating a 'relative name' when doing a whole batch of files. For example, the incantation:would create a thumbnail for each .jpg file in the thumbnails directory by the same name, (provided that the thumbnails directory exists, of course). Both Win32 and most UNIX shells treat the '&' character in a special way, so you have to put quotes around that command line option for the '&' to even be passed to the program.
- jhead -st "thumbnails\&i" *.jpg
If a '-' is specified for the output file, the thumbnail is sent to stdout. (UNIX build only)
Maybe fellow board member oops66 will help us out here:ExifTool Application Documentation » ([url=http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html#reading_examples]Reading Examples[/url]) wrote: exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
- Save thumbnail image from image.jpg to a file called thumbnail.jpg.
- Does PhotoME support extraction of EXIF thumbs?
- Would you recommend ExifToolGUI for Windows?
Last edited by XnTriq on Thu Aug 28, 2008 2:00 am, edited 1 time in total.
-
- Moderator & Librarian
- Posts: 6402
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
It's your inner geek that's breaking through.Conkers wrote:I am a complete novice! but it is amazing what you can do when you are determined!
A closer look at DSC01114.jpg reveals that the picture was taken at the maximum resolution of your Sony CyberShot DSC-V1: 2592×1944 (5 megapixels in Fine JPEG mode).
But the actual dimensions of the image you posted are only 800×600 pixels.
There's another thing leading me to believe you might have uploaded a downsized copy of the corrupted JPEG to your Photobucket account: Usually those bandings have sharp edges. The blurry edges in your image, however, show signs typical for certain resampling methods.
If an already damaged file is reprocessed, the mangled bits & bytes are mixed up even more. Therefor it becomes significantly harder – if not impossible – to “rearrange” them to their proper order.
Do you have a full-res version of DSC01114.jpg?
FYI: As a registered member of this forum you wouldn't have to post your photos publicly. You'd be able to send me links via private messaging instead. Members also receive a notification e-mail whenever there's a new reply in a topic they're interested in.
-
- XnThusiast
- Posts: 2005
- Joined: Tue Jul 17, 2007 1:17 am
- Location: France
ExifTool can recursively extract the thumbnails
---> Conkers
Just for information, after your crash disk, to try to extract the embedded thumbnails from your corrupted jpg files (of course the quality 'll be poor), and if you want to have exiftool recursively scan all jpg files and jpg into subdirectories then:
To extract all thumbnails recursively into thumbnails folder try to do:
if into a linux console (or batch .sh file) ~like:
if into dos prompt / windows ( or a batch .bat file) ~like:
Save thumbnails images from images####.jpg to files called images####_thumbnail.jpg.
PS: Make a test before, into a test-folder with few jpg files.
But I think, under Windows, ExiftoolGUI can do that easily ? but never tested.
PhotoMe : I do not know .
---------------------------------------
It is also possible to extract thumbnails from XnView.db (the SQLite Blobs), but I do not know any freeware to do that !
Pierre do you have a way to do that ???
Hello,XnTriq wrote:.......Maybe fellow board member oops66 will help us out here:ExifTool Application Documentation » [url=http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html#reading_examples]Reading Examples[/url] wrote: exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg
- Save thumbnail image from image.jpg to a file called thumbnail.jpg.
- Does PhotoME support extraction of EXIF thumbs?
- Would you recommend ExifToolGUI for Windows?
Just for information, after your crash disk, to try to extract the embedded thumbnails from your corrupted jpg files (of course the quality 'll be poor), and if you want to have exiftool recursively scan all jpg files and jpg into subdirectories then:
To extract all thumbnails recursively into thumbnails folder try to do:
if into a linux console (or batch .sh file) ~like:
Code: Select all
exiftool -b -m -ThumbnailImage -w thumbnails/%d%f_thumbnail.JPG -ext jpg -r .
Code: Select all
exiftool -b -m -ThumbnailImage -w thumbnails/%%d%%f_thumbnail.JPG -ext jpg -r .
PS: Make a test before, into a test-folder with few jpg files.
But I think, under Windows, ExiftoolGUI can do that easily ? but never tested.
PhotoMe : I do not know .
---------------------------------------
It is also possible to extract thumbnails from XnView.db (the SQLite Blobs), but I do not know any freeware to do that !
Pierre do you have a way to do that ???
XnViewMP Linux X64 - Debian - X64
-
- Posts: 8705
- Joined: Sun Oct 12, 2003 6:47 pm
- Location: Frankfurt, Germany
Re: ExifTool can recursively extract the thumbnails
To view the thumbnails stored in the cache you simply type in "cache:" in the address field of the XnView browser. XnView will then display all cached thumbnails. Though I have no idea how you can export the thumbnails into a new image. Pierre?oops66 wrote:... It is also possible to extract thumbnails from XnView.db (the SQLite Blobs), but I do not know any freeware to do that !
Pierre do you have a way to do that ???
-
- XnThusiast
- Posts: 2005
- Joined: Tue Jul 17, 2007 1:17 am
- Location: France
Ability to extract thumbnails from XnView.db
Right Helmut, it's the beginning of a new possibility (a new XnView function) to have the ability to extract thumbnails from XnView.db file (because in case of corrupted jpg files, it's better than nothings).
But above, more basically, I mean a way to extract blobs from any data base, not only Xnview.db.
So Pierre ???
But above, more basically, I mean a way to extract blobs from any data base, not only Xnview.db.
So Pierre ???
XnViewMP Linux X64 - Debian - X64
-
- Author of XnView
- Posts: 45062
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Ability to extract thumbnails from XnView.db
Don't know, perhaps with SqliteBrowseroops66 wrote:So Pierre ???
Pierre.
-
- XnThusiast
- Posts: 2005
- Joined: Tue Jul 17, 2007 1:17 am
- Location: France
Re: Ability to extract thumbnails from XnView.db
No, I have it (v1.3) but it doesn't manage the blob.xnview wrote:Don't know, perhaps with SqliteBrowser
So we waiting for this new xnview function -LOL !
XnViewMP Linux X64 - Debian - X64
-
- Moderator & Librarian
- Posts: 6402
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Hi Conkers,
thanks for your patience.
It took some time for me to get all the facts together.
Bad news: I wasn't able to fix your photo.
Good news: I'm no expert, just an XnTriq.
In other words: There's still plenty of hope
I consider this posting a preliminary report.
After you had sent me a full-size version of the photo I began replacing the header as explained by Calvin Hass.
For this method you'll also need “another photo taken with the same camera, and with the same orientation”. I downloaded a few from dpreview.com and dcresource.com.
Having tried all kinds of combinations (incl. bare headers w/o any metadata) unsuccessfully, I decided to examine the image once more with JPEGsnoop v1.2.0 (22/Jan/2008) & v1.2.1 β3 (09/Apr/2008). This time I enabled the Detailed Scan Decode option (Options » Scan Segment » Detailed Decode...) before hitting Ctrl+R (File » Reprocess File).
This more verbose output indicates scan errors in the bitstream of the JPEG rather than corruption of its header.
At first I though we were screwed. By then I had already tested a bunch of programs to no avail:
thanks for your patience.
It took some time for me to get all the facts together.
Bad news: I wasn't able to fix your photo.
Good news: I'm no expert, just an XnTriq.
In other words: There's still plenty of hope
I consider this posting a preliminary report.
After you had sent me a full-size version of the photo I began replacing the header as explained by Calvin Hass.
In case you'd like to follow along with the steps outlined in the tutorial, I've compiled a list of freeware hex editors (as well as text editors with hex editing capabilities):ImpulseAdventure ([url=http://www.impulseadventure.com/photo/fix-corrupt-jpeg-photo.html]Fix your Corrupted JPEG Photos![/url] » Comments » 2008-04-18) wrote:As a first method of trying to fix your corrupted images, it's always worth a shot and is easy to do.
In advance of this feature, here's what you can try doing:When you reopen the modified version of the damaged file, you should see that the thumbnail now represents the "good file" you were working with. If you only had a header corruption, then the damaged image may now be brought back to life!
- Open up the damaged photo (corrupted header) in the hex editor
- Open up another photo taken with the same camera, and with the same orientation in another window of the hex editor
- Identify the start of the real (not thumbnail) scan data -- the easiest way to do this is open up the damaged file in JPEGsnoop and look for the OFFSET line under the heading Marker: SOS. Note down this hex number (eg. 0x00002C5F).
- Repeat the same process with the good photo (eg. 0x000030DB)
- Now, in a copy of your corrupted photo file, use the hex editor to delete everything from 0x00000000 to 1 less than the offset noted in step 3 (ie. 0x00002C5E).
- In the good version of the photo, copy everything from 0x00000000 to 1 less than the offset noted in step 4 (ie. 0x000030DA).
- Back in the copy of your corrupted photo file, use the hex editor and paste (insert) what you copied, right at the start of the file (position 0x00000000). Save as a different file name.
- Brother Technology: AptEdit Lite
- HHD Software: Free Hex Editor Neo
- Marcin Dudek: ICY Hexplorer
- Jan Fiala: PSPad
- CoderTools: TotalEdit
For this method you'll also need “another photo taken with the same camera, and with the same orientation”. I downloaded a few from dpreview.com and dcresource.com.
Having tried all kinds of combinations (incl. bare headers w/o any metadata) unsuccessfully, I decided to examine the image once more with JPEGsnoop v1.2.0 (22/Jan/2008) & v1.2.1 β3 (09/Apr/2008). This time I enabled the Detailed Scan Decode option (Options » Scan Segment » Detailed Decode...) before hitting Ctrl+R (File » Reprocess File).
Code: Select all
*** Decoding SCAN Data ***
OFFSET: 0x00001726
Scan Decode Mode: Full IDCT (AC + DC)
[...]
*** ERROR: @ 0x0002EE09.4, num_coeffs>64 [66]
*** ERROR: Bad scan data in MCU(120,24): Lum DC CSS(1,0) @ Offset 0x0002EE0A.2
MCU located at pixel=(1928,192)
*** ERROR: @ 0x000EEE10.5, num_coeffs>64 [65]
*** ERROR: Bad scan data in MCU(95,130): Lum DC CSS(1,0) @ Offset 0x000EEE11.2
MCU located at pixel=(1528,1040)
*** ERROR: @ 0x0016EE00.1, num_coeffs>64 [68]
*** ERROR: Bad scan data in MCU(89,195): Lum DC CSS(1,0) @ Offset 0x0016EE01.0
MCU located at pixel=(1432,1560)
*** ERROR: @ 0x001AEE07.3, num_coeffs>64 [66]
*** ERROR: Bad scan data in MCU(29,222): Lum DC CSS(1,0) @ Offset 0x001AEE08.2
MCU located at pixel=(472,1776)
At first I though we were screwed. By then I had already tested a bunch of programs to no avail:
- e.World Technology: JPEG Recovery
- Recoveronix: PixRecovery
- VG Solutions: VG JPEG-Repair
- Wim Vanmaele: Programma's » Repair-jPeg
See also: S2 Services Data Recovery Freeware List: JPG and BMP Image Repair.
ImpulseAdventure ([url=http://www.impulseadventure.com/photo/jpeg-snoop-uses.html]JPEGsnoop - Interesting Uses[/url] » Comments » 2007-11-03) wrote:I'm pleased to report that I managed to recover these images almost perfectly! Your photos were great examples of heavy data corruption, which in turn helped me refine the fix methodology. What I found interesting, however, is that the corruption appeared to have some periodicity within the image, but not so much within the file stream.
ImpulseAdventure ([url=http://www.impulseadventure.com/photo/fix-corrupt-jpeg-photo.html]Fix Corrupt JPEG Photos![/url]) wrote:Fixing Corrupt Photos
During the development of JPEGsnoop (a JPEG analysis tool), I began to question whether it was at all possible to fix images that have had errors in the scan segment (JFIF SOS) bitstream. After significant analysis and tool development, I am happy to report that I am now able to correct many of these photos!
Unique Correction Technique!
While there are dozens of software utilities available on the web that advertise that they fix or recover corrupt JPEGs, I am not yet aware of any that actually correct scan bitstream errors (as shown in the samples below). In nearly all cases, these programs will recover the files from deletion (stitching file clusters together) but you may still be left with a damaged JPEG image!
I believe my technique to be unique and hence the reason I decided to post this page and share my services. Photos can often be fixed with virtually no degradation to the original image!
-
- Posts: 1
- Joined: Sat Aug 23, 2008 10:58 am
wow! thank you all so much for your help and interest.
I don't know what to say....
I'm in the process of looking at jHead at the moment. Can only seem to extract the first thumbnail and the rest says "image contains no thumbnail". mmm, will keep playing with it and will let you know!
I don't know what to say....
I have also looked at these, and probably alot more! None of them worked, so I gave up with them and concentrated on the thumbnail.XnTriq wrote:At first I though we were screwed. By then I had already tested a bunch of programs to no avail:
- e.World Technology: JPEG Recovery
- Recoveronix: PixRecovery
- VG Solutions: VG JPEG-Repair
- Wim Vanmaele: Programma's » Repair-jPeg
See also: S2 Services Data Recovery Freeware List: JPG and BMP Image Repair.
I'm in the process of looking at jHead at the moment. Can only seem to extract the first thumbnail and the rest says "image contains no thumbnail". mmm, will keep playing with it and will let you know!
-
- Posts: 24
- Joined: Wed Oct 31, 2012 3:37 pm
Re: Corrupt jpegs, thumbnail extracted...
I know I'm reviving the dead here but if I'd make a new topic about this I'd mostlikely get refered to here anyways.
I'd also like to retrieve some thumbs from my DB as they lost the connection to their originals through moving or other means.
If I could get the thumbs out I could fire them against a similarity software and see if and where I got the originals now.
I already tried cache: but that just showed them to me without letting me save them in any way so it's no help. Maybe I just missed something, dunno.
Another thing I'd also like to know is how the thumb data is composed, I already managed to get an images data out of the database for an external tool that shall fix some things like lost connections in the cache.
The problem is that the data is not useful, there's some additional data added before or mixed in, either way was I'm not able to determinate the beginning of the actual thumb data.
The only thing I know so far is that the data blob is longer than what the Size field states, so it's probably related to how to find the actual thumb in there, but it's not as easy as thumb = blob starting at (blob_lenght - Size).
The additional data seems to be longer than the difference between Size and the blob's size.
I'd also like to retrieve some thumbs from my DB as they lost the connection to their originals through moving or other means.
If I could get the thumbs out I could fire them against a similarity software and see if and where I got the originals now.
I already tried cache: but that just showed them to me without letting me save them in any way so it's no help. Maybe I just missed something, dunno.
Another thing I'd also like to know is how the thumb data is composed, I already managed to get an images data out of the database for an external tool that shall fix some things like lost connections in the cache.
The problem is that the data is not useful, there's some additional data added before or mixed in, either way was I'm not able to determinate the beginning of the actual thumb data.
The only thing I know so far is that the data blob is longer than what the Size field states, so it's probably related to how to find the actual thumb in there, but it's not as easy as thumb = blob starting at (blob_lenght - Size).
The additional data seems to be longer than the difference between Size and the blob's size.
Debian 12 x64 - XnViewMP 1.6.2 x64
-
- Posts: 1
- Joined: Sun Aug 25, 2013 6:38 pm
Re: Corrupt jpegs, thumbnail extracted...
Dear Conker,
looking for solution of my damaged JPEG, I am found out that You had a same problem 5 years ago. I will be very grateful if you answer me were you able to recover your photos and how.
Thank you in advance.
Best regards
looking for solution of my damaged JPEG, I am found out that You had a same problem 5 years ago. I will be very grateful if you answer me were you able to recover your photos and how.
Thank you in advance.
Best regards