RetouchPRO

Go Back   RetouchPRO > Technique > Photo Restoration
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photo Restoration Repairing damaged photos

damaged image file "invalid header"

Reply
 
Thread Tools
  #11  
Old 07-03-2007, 10:48 PM
maureeno maureeno is offline
Senior Member
 
Join Date: Jun 2005
Posts: 214
Re: damaged image file "invalid header"

Quote:
Originally Posted by imagenewb View Post
i have been given a picture to repair that i can not seem to get to open
no thumbnail
does not work in PS, Corel, MGI, IE, nothing...

what happend was this picture was hidden for security reasons
i was told that in order to ensure it was not opened by anyone other than them, it was opened in notepad, a space was entered as the very first character, now that it is needed as evidence, even with the space removed, it will not open in any program i have tried... i am far from an expert with this, but i have tried numerous things with no luck... any and all help would be appreciated...

and i am not allowed to upload this file, sorry...
I can only advise you to go back to your original "client" and request they send the file to forensics.

They'll know what you mean.

Maureen
Reply With Quote top
  #12  
Old 07-04-2007, 12:11 AM
Doug Nelson's Avatar
Doug Nelson Doug Nelson is offline
Janitor
 
Join Date: Aug 2001
Posts: 7,068
Blog Entries: 21
Re: damaged image file "invalid header"

If they would have uuencoded the file first, or used a hex editor instead of notepad, this would have worked. But as it is they sent you a meaningless pile of bits.
Reply With Quote top
  #13  
Old 07-04-2007, 11:20 AM
Photo678's Avatar
Photo678 Photo678 is offline
Senior Member
 
Join Date: May 2004
Posts: 328
Re: damaged image file "invalid header"

Quote:
Originally Posted by Dave.Cox View Post

Bottom line is, your file is no longer a photo file, and getting it back to a photo file would be chancy at best.
.

that's not entirely true. Although the binary has been fiddled with, simply deleting that extra space that was placed in there will return the image back into an image. Try it for yourself.
Reply With Quote top
  #14  
Old 07-04-2007, 02:11 PM
Dave.Cox's Avatar
Dave.Cox Dave.Cox is offline
Senior Member
 
Join Date: Feb 2007
Location: GrandPrairie.TX
Posts: 536
Re: damaged image file "invalid header"

I'm sorry to say, that deleting the extra space will not return the file back to the original image. The reason is that when the file was opened by notepad, notepad converted all characters that it did not recognize to characters that it would recognize, usually an ascii 20 which is a space in the ascii character set. When the file was then saved, the file was then damaged. There is no way to know for sure which characters were and were not changed. Try it your self, and look a the file before and after with a hex editor, and you will see what I mean.

You can get a free hex editor to try this with if you wish from here.

http://www.chmaas.handshake.de (Ken, I think this might be what you are looking for.)

Save the copy of the original file to a new file, with a new name so you don't damage the original file, and then edit the file with notepad and save it. Open it with the hex editor, and open the original in another instance of the hex editor. The most obvious change that you will see, is all of the $00 characters are now $20. The problem is that character data and binary data is treated differently by the respective programs. When you open a binary file in notepad, it converts what it considers to be illegal characters to something that it can handle. When you then save it again, that is when the file is damaged.

I added images of the data at the beginning of the 2 files so you can see what I am talking about. The image of test1 is my original jpg file, and test2 is the same file that I opened and save with notepad, without making any changes. You can see, that notepad made numerous changes to the data in the file.
Attached Images
File Type: jpg test2.jpg (197.5 KB, 13 views)
File Type: jpg test1.jpg (187.7 KB, 13 views)

Last edited by Dave.Cox; 07-04-2007 at 02:29 PM.
Reply With Quote top
  #15  
Old 07-04-2007, 03:18 PM
Photo678's Avatar
Photo678 Photo678 is offline
Senior Member
 
Join Date: May 2004
Posts: 328
Re: damaged image file "invalid header"

well, im on a mac, and if i open a jpg in text edit, add a space or two, or three, and save it.....it won't open. If i reopen the image in text edit, remove the spaces and save again, it opens just fine.
Reply With Quote top
  #16  
Old 07-04-2007, 06:56 PM
Dave.Cox's Avatar
Dave.Cox Dave.Cox is offline
Senior Member
 
Join Date: Feb 2007
Location: GrandPrairie.TX
Posts: 536
Re: damaged image file "invalid header"

I'm less familiar with the Mac text edit program, but I believe the program in question here was notepad.
"... it was opened in notepad, a space was entered as the very first character ..." Therefore, that was the program that I tested. I'm not at all surprised that the results with a different program is different.

Regardless, this is not a very good method of securing a file, since doing this will either leave the file with very poor security, or render the file useless.
Reply With Quote top
  #17  
Old 07-04-2007, 09:25 PM
Photo678's Avatar
Photo678 Photo678 is offline
Senior Member
 
Join Date: May 2004
Posts: 328
Re: damaged image file "invalid header"

Quote:
Originally Posted by Dave.Cox View Post

Regardless, this is not a very good method of securing a file, since doing this will either leave the file with very poor security, or render the file useless.
agreed :-)
Reply With Quote top
  #18  
Old 07-05-2007, 03:38 PM
Flotsam's Avatar
Flotsam Flotsam is offline
Member
 
Join Date: Jul 2007
Location: Diamond Harbour, New Zealand
Posts: 67
Re: damaged image file "invalid header"

If you are using a Mac try Filetyper to reassign format
http://www.frederikseiffert.de/filetype/
or
Graphic Converter
http://www.lemkesoft.com/
Reply With Quote top
  #19  
Old 07-06-2007, 12:58 PM
Cameraken's Avatar
Cameraken Cameraken is offline
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,158
Re: damaged image file "invalid header"

Hi Dave.

Thanks for the link. That’s a great little hex editor for the money

I did have a hex editor but XVI32 is nice because it gives a side by side view.

I will probably stick with VB to do the actual conversions because it's quick and misses nothing but XVI32 does have a 'replace all' and will get some use on small files

Thanks Again.

Ken.
Reply With Quote top
Reply

  RetouchPRO > Technique > Photo Restoration


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing images for RetouchPRO jeaniesa Photo Retouching 19 11-05-2016 09:28 PM
Posting Your Image and Works Etiquette Craig Walters Photo Restoration 27 09-26-2016 12:30 PM
Tutorial 05: Converting a Color Image to Black and White grayscale BW DannyRaphael Photo-Art 101 17 05-22-2011 05:55 PM
Tutorial 06: Pencil sketch DannyRaphael Photo-Art 101 19 04-10-2004 01:06 PM
help - compression problem cendres Photoshop Help 15 02-11-2002 10:42 AM


All times are GMT -6. The time now is 11:30 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved