Log in

View Full Version : repairing corrupted jpeg files

2004-07-26, 13:32
After getting my film developed, I got some pictures back on the CD in which I can't open some of the files because they are corrupted. The error messages I get are "unknown format" and "can't read file header". The files look normal sized so the data is probably there but in a corrupted format. So far the only program I found is a hex editing program called WinHex (http://www.x-ways.net/winhex/index-m.html), but it is not a free program. I am looking for a freeware or open source program that would allow me to fix my corrupted jpeg files.

2004-07-26, 15:44
did you try renaming & saving them as jpg or jpeg?

2004-07-26, 15:58
i'm unsure if this'll help but it's a free prog i've used a long time...


2004-07-26, 21:35
Thanks. I've got a whole bunch of options to explore now. I'll let you know which one worked. The files already have an extension of jpg.

2004-07-28, 01:58
I tried to use WinHex but it doesn't have anything to fix corrupted files automatically. I would have to manually do it. I tried opening the files in different imaging programs. The error messages I got in GIMP from the seven corrupted files was helpful:
Not a JPEG file: starts with 0x2c 0xff
Not a JPEG file: starts with 0x1c 0x01
Not a JPEG file: starts with 0x33 0xc9
Not a JPEG file: starts with 0x4c 0x78
Not a JPEG file: starts with 0x9a 0x00
Not a JPEG file: starts with 0x8a 0x1c
Not a JPEG file: starts with 0x13 0x0b

I examined the files with the hex editors but didn't see where the files started with these points, so I didn't know where to fix them. The fact that they all start differently is not a good sign. It seems that all the data could be corrupted or encrypted then if each one starts differently. All the other good files in the same batch all started with ff d8 ff e0.

2004-07-28, 12:09
I just realized that when it gives the error message in GIMP "starts with 0x2c 0xff" that it is referring to it starting with 2c ff, so the error message makes sense if the "0x" is ignored.

I tried changing the files in the beginning to have the data FF D8 FF E0 00 10 4A 46 - 49 46 00 01 which identifies it as a jpeg file, but then I got the following message in GIMP: "Corrupt JPEG Data: 389 extraneous bytes before marker 0xe0". So maybe what I have to do is add it on the beginning rather than changing what is there. This site has some information on the hex values of different file formats:

2004-07-29, 04:42
i wish i could help dude but that stuff's way to complex for my simple brain

i'd suggest google for a few photo type forums or dig cam forums

2004-07-31, 19:49
Do you have Photoshop? Sometimes it'll see the problem and open it up anyway. I was gonna say email me one of the corrupted files and I'll see what I can do with it if ya like ...but it sounds like you're on the way there. I'm no wiz, but I seem to get lucky in these kinds of things sometimes.

2004-08-01, 00:00
I was gonna say email me one of the corrupted files and I'll see what I can do with it if ya like ...but it sounds like you're on the way there.
No, I'm not close to solving the problem. I've given up actually. I tried to open it with GIMP, which is supposedly close to PhotoShop, but couldn't. Here is a link to it if you want to try to download it and fix it. I hope it's not the nude one of me though

2004-10-15, 05:38
I found an open source hex editor for Windows known as Hexplorer (http://sourceforge.net/projects/hexplorer/).

2007-07-21, 11:57
hi .. i need urgent help on this .. 1 of my folders has around 65 jpeg files. all of them r very important n i cant lose any of them.

yesterday i cut paste that folder into another location. n widout cheking, 2day i cut paste it back 2 where it was. wen i opened the folder, i cud c all the files perfectly. file name, file size, everything was perfect. only there was no preview in thumbnails, and when i clicked on a file to open it, it said 'no preview available. when i opened in photopshop, it says, " could not complete your request because reading spatial/lossless JPEG files is not implemented ". when i imported in flash, it said ' one or more files cannot b imported because there is a problem reading them '. once it also gave an error that the file is damaged. these files were perfect till last nite, b4 i cut paste them sumwhere else. rite now all files have proper file names n file size is also the same. but i cannot c any picture. PLEASE PLEASE HELP.


2007-10-13, 12:56
This type of error is common; I have an xD card at the moment that's got a very similar prob. Transferring files can sometimes alter the offsets where files start and end. I don't know how or why but it seems to happen. So you get the arse end of a file at the start of the offset and the front part of the file starting in the middle. Most viewing programmes such as windows explorer and quick view plus don't see the expected header numbers (hex FF D8 FF E1 or FF D8 FF DB, or other signatures) so can't recognize the JPEG. HexEdit or JPEG recovery, and many others, can search the file for a header, or signature, and give at least part of the file back. Total recovery is very difficult. Look up signature based recovery.