Welcome to RetouchPRO, the web community for retouchers.
You are currently viewing as an unregistered guest which gives you limited access. Registration is fast, simple and absolutely free so please, join RetouchPRO today!
If you have any problems with the registration process or your account login, please contact us. If you've forgotten your password, click here.
| | Photo Restoration Repairing damaged photos | 
07-03-2007, 12:56 PM
| | Junior Member | | Join Date: Jul 2007
Posts: 3
| | damaged image file "invalid header" i have been given a picture to repair that i can not seem to get to open
no thumbnail
does not work in Photoshop, 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... | 
07-03-2007, 01:26 PM
|  | Moderator | | Join Date: Apr 2005 Location: somewhere over there
Posts: 5,916
| | | Re: damaged image file "invalid header" imagenewb, welcome to RetouchPRO.
offhand, my first inclination would be to check the file extension and to make sure that it is not .txt or .doc and to verify somehow that it's been changed back to the original extension, whatever that was.
but, it may be more serious than that. notepad basically saves in a text format, not binary. pictures are binary. they are binary files. that means when the original was converted to notepad, the entire nature of the file may have changed, since the file would have been changed when it was loaded and then saved, since i dont think notepad can save as a binary.
and, if that was the case, then i dont know of any way to convert it back to a binary file and it may well be lost. in the future, if you've got an image you want to save hidden, for security reasons, i'd try encrypting with something that can encrypt and then de-encrypt and make sure it can do it with image files.
you could try a search on google or another engine, and try something like '.txt to .jpg conversion or something along those lines, or maybe 'text to binary conversion'.
__________________ Craig
(primarily using paint shop pro photo xi) | 
07-03-2007, 01:37 PM
| | Junior Member | | Join Date: Jul 2007
Posts: 3
| | | Re: damaged image file "invalid header" i was under the assumption that jpegs were written in hex... | 
07-03-2007, 01:54 PM
|  | Senior Member | | Join Date: May 2004
Posts: 325
| | | Re: damaged image file "invalid header" ask them to send you the picture without the characters in it. if security reasons are needed, tell them to rar it up with a password.
__________________ | 
07-03-2007, 01:58 PM
| | Junior Member | | Join Date: Jul 2007
Posts: 3
| | | Re: damaged image file "invalid header" they said they removed the extra space and could not open it, which is why they gave it to me... i need to fix it for them... | 
07-03-2007, 01:58 PM
| | Senior Member | | Join Date: Sep 2006
Posts: 228
| | | Re: damaged image file "invalid header" hi,
to me you have created a delima, normally i would like to help, however.."security reasons" to me that sounds like the document has a secuirty classificiation, possibly governement, you can't tell us anything about it or upload it because of this classification....
it appears you (or the holder of the file, don't have authorization to open the file since if you did they would have given more detailed info on how to open it properly .......
and it going to be used as evidence..... mmm...
maybe i am seeing/reading too much but.. i see red flags on this request.... Quote:
Originally Posted by imagenewb i have been given a picture to repair that i can not seem to get to open
no thumbnail
does not work in Photoshop, 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... | | 
07-03-2007, 02:05 PM
|  | Senior Member | | Join Date: May 2004
Posts: 325
| | | Re: damaged image file "invalid header" Quote:
Originally Posted by imagenewb they said they removed the extra space and could not open it, which is why they gave it to me... i need to fix it for them... |
You should be able to just remove the space and have it open....if thats the not the case then something else is wrong
Not sure what person would use an added space to the file structure as security measures though.....but you might be involved in something you shouldn't be. Decline and tell them to reacquire the image with PROPER security measures. Perhaps even saving as a pdf from indesign with password security to open it.
__________________
Last edited by Photo678 : 07-03-2007 at 02:10 PM.
| 
07-03-2007, 03:15 PM
|  | Senior Member Patron | | Join Date: Aug 2006 Location: Southern California
Posts: 450
| | | Re: damaged image file "invalid header" I may not fully understand this problem, but for years I have used a program called Quick View Plus to open programs for which I do not have installed software. http://www.avantstar.com/Products/Qu...ewPlusOverview
dc | 
07-03-2007, 05:38 PM
|  | Senior Member Patron | | Join Date: Feb 2007 Location: GrandPrairie.TX
Posts: 393
| | | Re: damaged image file "invalid header" An image file is what we call a binary file. This means that the data is stored in the file as a bunch of one and zeros, which are sometime represented by hex numbers from 00 to FF, in a specific order. Text editors also store text in text files as a set of numbers in hex from 00 to FF, but these numbers are stored much differently. Notepad only recognizes the lower set of numbers that are assigned to what is called the standard character set. any number that notepad sees that is outside of the standard character set, notepad will try to convert to something that it understands. The most common conversion is it will convert all 00 characters to 20, because 00 is not a valid character, and 20 is the space character. 00 is a valid binary data number however. Once this happens to the photo file, when photo programs try to read in the file, they are looking for specific types of data, in a specific order. Since that data is no longer there and in the correct order, the programs don't know what to do with the data, and will return an error indicating that they don't know how to process the file.
Bottom line is, your file is no longer a photo file, and getting it back to a photo file would be chancy at best.
Sorry if this is too technical, but thought I would throw it out there for those that might be interested. | 
07-03-2007, 07:34 PM
|  | Senior Member | | Join Date: Feb 2005 Location: Lancashire (UK)
Posts: 1,109
| | | Re: damaged image file "invalid header" Thanks Dave.
That’s really interesting.
I get these problems all the time.
Even symbols like degrees (°) turn to junk in my (accounts) editor.
Do you know of a text editor that displays all these characters correctly?
At present I use VB to change the chr() to something usable
eg.
If InStr(data(t), Chr(176)) Then etc.
but it would be nice to have an editor where I could 'see' these characters.
Imagenewb.
Sorry for the hijack. But an editor where you could see these characters may help with your problem as well.
Ken. | 
07-03-2007, 09:48 PM
| | Senior Member | | Join Date: Jun 2005
Posts: 204
| | | Re: damaged image file "invalid header" Quote:
Originally Posted by imagenewb i have been given a picture to repair that i can not seem to get to open
no thumbnail
does not work in Photoshop, 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 | 
07-03-2007, 11:11 PM
|  | Janitor | | Join Date: Aug 2001
Posts: 3,843
| | | 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.
__________________ Learn by teaching
Take responsibility for learning | 
07-04-2007, 10:20 AM
|  | Senior Member | | Join Date: May 2004
Posts: 325
| | | Re: damaged image file "invalid header" Quote:
Originally Posted by Dave.Cox
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.
__________________ | 
07-04-2007, 01:11 PM
|  | Senior Member Patron | | Join Date: Feb 2007 Location: GrandPrairie.TX
Posts: 393
| | | 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.
Last edited by Dave.Cox : 07-04-2007 at 01:29 PM.
| 
07-04-2007, 02:18 PM
|  | Senior Member | | Join Date: May 2004
Posts: 325
| | | 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.
__________________ |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -6. The time now is 04:15 AM. | |
|