Cannot view or open recovered jpg's which had previously been deleted in error, though file size would indicate file is complete

Recently, whilst trying to free up some HD memory, I wrote some images onto a dvd and then deleted the images on my HD. To my horor when I subsequently tried to view the images on the dvd, they were not there.

Using Active File Recovery software, i managed to recover most if not all of the files, but whilst some are ok and open fine, most of them, cannot be opened or previewd or anything.

These images are very important to me and i could lose a very important contract if I cannot resolve this, so any help would be greatly appreciated.

IMPORTANT: I do not need recommendation for recovery software that will find the files and recover them, i have already done this and unfortunately cannot redo this with other software, as a problem with my OS required formating of my HD and reinstallation of WinXP, so it is unlikely that I would be able to recover anything now. What I really really need is some way of fixing the corrupt files that i have already recovered.

I found the following question on this site but it does not adequately resolve the issue.


-----------------

Title: How to repair corrupt JPG and AVI files ?
asked by distant_memory on 01/20/2004 07:47AM PST  
This solution was worth  125 Points and received a grade of A  

-----------------


Thank you in advance for any help you can give.
Sam
samvivAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

war1Commented:
Greetings, samviv !

1. First make sure an important file to view picuture is registered.  Go to Start > Run and type
regsvr32 shimgvw.dll

2. Make sure the JPEG files that you cannot open are NOT write protected. When moving from CD, files are automatically write protected.  Right click on the file and select Properties.  Uncheck "System" and "Read-Only".

3. Try to open the file in another program.  Use Irfanview
http://www.irfanview.com

If the file opens correctly, save it with Irfanview.  Now you should be able to open the file in other programs.

Best wishes!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
samvivAuthor Commented:
Thanks War1,

The image file were recovered from the HD before it was formatted. It doesn't look like the images copied to the dvd at all.

I downloaded irfanview and when I opened an image with it, it gave message, "cant read file header, unknown file format"

can you suggest anything else

cheers

sam

war1Commented:
Sam,

Looks like your image file is damaged.  I was hoping Irfanview is able to recovery it.  You can use Pixrecovery to repair the file

http://www.officerecovery.com/pixrecovery/
Fundamentals of JavaScript

Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

samvivAuthor Commented:
tried pixrecovery, message it givs is "no data to recover detedted"

The impression I get whilst watching the process as the program tries to recover the data is that the program sees the file as complete and not i need of repair.

It looks like I need a program which can repair headers to allow the image to be viewed or at least partially viewed.

.....I'm getting desperate..............

Thanks for your help!
lherrouCommented:
Sam,

Here's a couple of thoughts for you:
First of all, just because you have recovered data files from the HD, does not mean that other software might not be able to help you. In particular, take a look at BadCopy Pro (http://www.jufsoft.com/badcopy/) and PhotoRescue (www.datarescue.com - for both Microsoft Windows and Mac OS X). Each of these can deal with corrupted graphics files, and help repair the damaged files.

You can also sometimes open corrupted file in applications like CorelDraw (which can sometimes import damaged JPGs. Once the file is imported into Draw it can be exported again as a new fresh JPG) or Photoshop (using RAW mode). For the latter, you need to know the size of the image in pixels. What you do in Photoshop is select File>Open As and in the dialog box choose RAW and then the file you want to open. Another dialog box will ask you to enter a size in pixels and the amount of channels (choose 3 here), leave the Header Size blank and click OK.

Last, some times the file can be opened in a text editor or a Hex editor, and the headers slightly, allowing them to be opened with Photoshop. However, if there is a lot of information missing from the files, it is impossible to fully recover the images.

Hope that helps,
LHerrou
samvivAuthor Commented:
Thanks for your advice LHerrou, I've tried jufsoft, it goes through the recovery process and tells me recovery was successful but when i try to view the image it says image corrupt or invalid.

I don't suppose I could send you one of the files to play with, could I?

Cheers

Sam
lherrouCommented:
Sam,

EE frowns on interaction via email, because it does not allow other experts to contribute. You are welcome to post a link to a couple of files, and I (and perhaps others) will take a look at them...

 
samvivAuthor Commented:
I'm afraid I dont know how to do that.  
lherrouCommented:
Simply sign up for free hosting at any of a number of sites, from http://www.onesite.com/ to http://geocities.yahoo.com/ and upload a couple of the images. Post the address here when you have it up and running, and we'll take a look.
samvivAuthor Commented:
your too kind will give it a go tomorrow night hopefullu (UK time)
Mark_FreeSoftwareCommented:
some quotes from over the net:

JPEG files have a header telling how it is compressed, and the dimensions of the image. If this gets corrupted, the file makes as little sense as an encrypted file. To read such a file again you need a new header to unlock it. You can get such a "key" if you can get hold of an image from the same type of camera, taken with the same quality setting. Then copy the header from the good JPEG to the damaged one with a Hex-Editor (like HexEdit), and it could become good enough to be readable with image viewers.

//

download Irfanview (you should already have this freeware!) (http://www.irfanview.com / irfanview.net)
choose the "corrupted" images in the filebrowser and go to
File - JPG Lossless Operations - Lossless transformations with selected Thumbs...
then only choose: transformation: none, optimize JPG file, save with original date/time andKeep all APP markers.
After that the files do work again!

//


also take a look at this program:

JPEG-JFIF repair




samvivAuthor Commented:
Thanks Mark,

I've downloaded hexedit, but its all french to me, can you give me a very basic description of how to copy the header of a healthy file to a corrupt one. Thanks Sam
Mark_FreeSoftwareCommented:

i hope you can follow this, if i'm going to fast for you just call me back :P

!!!!!!!!before proceding you have to make a backup of all the images you are opening with hexeditor!!!!!!!!!!!!!

just to be sure ;)

i assume that you have 3 or more jpegs from the same source with the same size!!!!!,
2 correct, and one broken

open both correct files in a hexeditor, and look at the begin of the files

it should begin with FFD8

and then a bunch of other hex numbers

compare the first numbers until they differ.
if you have more correct images, you can do this with more images for an accurate header.


now open the corrupt file, and look at the first few bytes.
if they are like 00 00 00 00 or FF FF FF FF you can overwrite them, else you have to try if the first numbers are already part of the image or part of the corrupted header

that is just trial and error, that's why you have to save them before!


some notes:
if they jpegs are from different sources the header will be different
the width and height is stored in it, but also the encoding and compression and such stuff, so you can't use the header of a fil from paint with the header of a file from photoshop


very much succes with it!!!!!!
Mark_FreeSoftwareCommented:

what about split between

war1,lherrou and me?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Graphics Software

From novice to tech pro — start learning today.