Repairing damaged image files?

S

Sproo

I've several times encountered the following with downloaded
jpeg-format images: the image does not preview, or not properly (grey
or garbage at the bottom, as though the file is corrupt or truncated),
but Explorer generates an intact-looking thumbnail version.

Clearly the image data is all there, but with a "frameshift mutation",
"nonsense mutation", or other problem that causes the previewer to
choke or go off the rails partway into the file, while not fazing
whatever code generates the thumbnails.

Unfortunately, the most obvious fix (load it in a proper image-editing
app like photoshop and save it to re-encode it) rarely works. Most of
the damaged images come up garbled in these, sometimes worse than in
Explorer's previewer.

Strangely, it looks like there are three different jpeg decoders in all
this software: a good one in the thumbnail generator that is able to
repair damaged images while reading the file; a basic one in the
previewer; and an outright crummy one in photoshop that is more easily
confused than Explorer's.

The images are clearly recoverable, not just in principle but in
practise; that the thumbnail generator is able to decode the file,
resize it, and generate a thumbnail that looks non-corrupt proves this.
All that is needed is a tool that uses the same method as Explorer's
thumbnail generator to decode and fix images, but then lets you save
the (full-size) image to the name of your choice.

Does anyone know of such a tool? (I presume that most or all images
whose thumbnails look corrupt as well won't be recoverable this way.)

(I'm not being fooled by cached thumbnails -- these are freshly
downloaded files, and I have thumbnail caching disabled anyway;
thumbs.db files can quickly accumulate to consume a full gig(!) or more
of disk space if you work with images a lot, otherwise. Besides, that
would require the image be preexisting on my hard drive, a thumbnail
get cached, and then the image get damaged; I'm not in the habit of
randomly hex-editing my image files. :))
 
J

John Inzer

Sproo said:
I've several times encountered the following with
downloaded jpeg-format images: the image does not
preview, or not properly (grey or garbage at the bottom,
as though the file is corrupt or truncated), but Explorer
generates an intact-looking thumbnail version.
snip<
==============================================
Can you provide a link to one of the files you are referring to?

--

John Inzer
MS Picture It! MVP

Digital Image
Highlights and FAQs
http://tinyurl.com/aczzp

Making Good Newsgroup Posts
http://www.dts-l.org/goodpost.htm
 
S

Sproo

Nope. Why would you need it? I'm just asking what the thumbnail
generator uses as a jpeg decoder, basically -- it's obviously more
sophisticated and error-correction capable than any other app's I've
seen.
 
M

Michael J. Mahon

Sproo said:
Nope. Why would you need it? I'm just asking what the thumbnail
generator uses as a jpeg decoder, basically -- it's obviously more
sophisticated and error-correction capable than any other app's I've
seen.

Not necessarily.

JPEG coding is intrinsically hierarchical, in the sense that the
average color of each 8x8 block is represented by a single set of
numbers. A thumbnail viewer is usually reproducing a picture with
less than one pixel for each 8x8 block, and so never needs to look
at any other data than the block averages.

-michael

Home page: http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."
 
S

Sproo

So if I recovered these images, the damaged parts would probably be
blocky or blurry. hm.
 
G

Guest

Hey Sproo me too! I have the same trouble, have you came up with any
solutions yet? I will have a thumbnail that looks correct but when you open
the picture I get a corrupt image as well.
 
M

Michael J. Mahon

Sproo said:
So if I recovered these images, the damaged parts would probably be
blocky or blurry. hm.

That is one possiblity. It all depends on exactly how the files are
damaged, and what strategies the decoding program uses to cope with
damaged files. Quitting early is the easiest and fastest option. ;-)

I would not be surprised if there isn't a JPEG decoder out there
designed expressly for recovering as much data as possible in a corrupt
file. It's probably not the fastest decoder, but would be a nice tool
to have for emergencies.

Anybody know of one??

-michael

Music synthesis for 8-bit Apple II's!
Home page: http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."
 
G

Guest

I'm also having this problem. Mine is with photos that are on a CD.
I used a piece of software called CDCheck that restored the corrupt part of
the image but in blocks that were out of order. ie. it looked like a puzzle
where you have to rearrange the pieces to make the picture.
Depending on the type of corruption this might help with you, it's not
limited to files on CDs it will work with any drive that shows up in My
Computer.

If anyone knows any other way of restoring these images then PLEASE let us
know.
 
J

John Inzer

Ellie said:
I'm also having this problem. Mine is with photos that
are on a CD.
I used a piece of software called CDCheck that restored
the corrupt part of the image but in blocks that were out
of order. ie. it looked like a puzzle where you have to
rearrange the pieces to make the picture.
Depending on the type of corruption this might help with
you, it's not limited to files on CDs it will work with
any drive that shows up in My Computer.

If anyone knows any other way of restoring these images
then PLEASE let us know.
=============================
For recovery of corrupted files from a
CD/DVD...maybe the following software
will be useful:

ISO Buster
http://www.smart-projects.net/isobuster/

--

John Inzer
MS Picture It! MVP

Digital Image
Highlights and FAQs
http://tinyurl.com/aczzp

Making Good Newsgroup Posts
http://www.dts-l.org/goodpost.htm
 
G

Guest

I'm having the same problem too. So I tried to upload one of the pics to
Flickr and it wouldn't even take it. It didn't recognize it as a jpg even
though the file name was img20.jpg.
I guess it sounds like it's a decoding issue but what really bothers me is
that it only happened when I updated XPpro!
 
G

Guest

I tried PixRecovery at http://www.officerecovery.com/pixrecovery/index.htm
but it couldn't even read the file. I have the same problem as you but I
think it was a microsoft fix that messed up my files.
Remember when MS issued a security fix for images so that if the images had
viruses in them it won't hurt your computer......... that's what messed up my
pics.
Does anyone know of a fix for the fix???
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top