Announcement

Collapse
No announcement yet.

Can't Read File Header, Unknown file format

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Can't Read File Header, Unknown file format

    I've got some jpg files that can't be opened using IrfanView or any other viewer. I'd like to try to troubleshoot these files but wanted to see if anyone else here has come across this problem. I've searched around the net and it seems that other people have had this problem but the forums weren't really very tech savvy so I'm hoping this is a good place to get info.

    Another example of a message I get is what I get when using the MS Photo Editor. It says "Can't determine type".

    I wonder if the header information (EXIF? info) has been corrupted but I'm not sure where to start.

    I can post a pic if anyone wants to test it.
    Thanks for any help.

    #2
    Yes, it would be helpful if we had a specimen to dissect. I have run into a few things like this. In one case I had a PNG image that was messed up. I opened it in a hex editor and cut out some garbage at the beginning and it was fine. I also had a JPG that caused IrfanView great distress but that is still an unsolved mystery.

    Where/how did you aquire the files? Sometimes a web browser or download manager will save a HTML file as a JPG - usually a 404 (file not found) error page. Those would be only a few KB in size. Other files get misinterpreted and mis-saved too. If it is a case of corruption of image files that really were JPGs, they might be useless, or they might be repairable. Have you tried opening them in a hex editor, file analyzer, or text editor?
    Last edited by matera; 06.06.2007, 03:46 AM. Reason: typo lol
    Its: Belongs to "It"
    It's: Shortened form of "It is"
    ---------------------
    Lose: Fail to keep
    Loose: Not tight

    ---------------------
    Plurals do not require apostrophes

    Comment


      #3
      There were other jpg-read problems recently. also relating to the header data.
      But first of all the main question : is this really a JPG-file, or is it the wrong extension.
      This can be checked by opening the JPG with an ascii-editor. Strings like JFIF or EXIF on the top line point to a JPG format.
      So a pic would be very helpful to determine this problem.

      EDIT : Hi Matera, I missed your post while writing mine..
      0.6180339887
      Rest In Peace, Sam!

      Comment


        #4
        I get the same error message (I think):

        <filename.jpg>: Can't read file header !

        Unknown file format or file not found.


        The thing is that the files that give this error message on the laptop are OK when accessed by the desktop (where the files are actually located). Sysinternals processmon reports ACCESS DENIED when IrfanView tries to open the file on the desktop from the laptop. The issue seems to affect randomly selected files within the same directory.

        Using the desktop, I copied the files to a new directory on the desktop and then access via the laptop was fine! Deleted the originals and copied the files back to the original location...still fine. Go figure.

        If you search "can't read file" under networking in XP help/support, there are few KB items that come up that seem very similar therefore I think it is likely an XP problem in my case. Hope this helps a bit...it sure causes annoyance/panic when it heppens.

        Chris P.

        Comment


          #5
          File examples from OP

          Ok...this is the OP...sorry it's been so long since I posted ...
          I've attached two example files. I was actually able to track down the same jpg file: the version that opens and the one that has the above-described problem.

          NOTE: I had to rename the bad/corrupted file with a .zip extension because the forum upload utility wouldn't let me attach it and kept telling me that it wasn't a valid .jpg or .bmp or .jpeg or ...whatever file. Zip is the only one I could coerce into uploading. So, if you want to investigate the file with the .zip extension, just simply change the extension to .jpg. I also attached the working version of the file (Pic 1 that works.jpg). Note that one way you can tell that they're the same file is that they have the same file size though a different file date (for a reason described further below).

          To respond to another poster's question....yes, these are assuredly jpg files as are dozens of other photos I have that won't open. I took the photos myself. As you can see with the "pic 1 that works.jpg" file, it should open for you fine. But the other won't.

          I don't know if this helps or not but when I went to rename the bad/corrupted file just to give it a different name for uploading to this forum, Windows asked if I was sure I wanted to rename this *read-only* file. So, I wonder if it means something that this file has somehow been set to be a read only file. And...no, I was not able to open the file after simply removing the read-only switch.

          Here's another hopefully helpful tidbit of info. It seems that these files that won't open for me (as well as other people that I've read about in other forums) are files that have been moved, backed-up or otherwise saved to some other drive location at some point. That's the case with this particular file; I burned it to a CD. I think this is why the attached files have different dates. Similarly, some other .jpg files I have that won't open were moved to another drive at some point and not burned. Does the nature of this issue strike a chord with anyone??

          ....this problem is driving me crazy ....would love to see someone crack this mystery. I hope these details help since I think I have uncovered more clues than people in other forums with the same problem.

          Thanks.
          Attached Files

          Comment


            #6
            I investigated the contents of those two files.
            I don't think this is a matter of renaming, repositioning or read-only.
            Pic 2 simply lacks any header bytes at all for recognition, its just a piece of content data.
            So the EXIF info is not corrupt, it's simply not there.
            As Pic 1 contains EXIF data as a header, maybe some app has wiped this EXIF data without replacing it for the default JPG header.

            EDIT : as the two filesizes are exactly the same, another possibility could be, that the JPG file is 'scrambled' in some way
            by some app with a encryption code.
            Last edited by Sam_Zen; 29.06.2007, 05:12 AM.
            0.6180339887
            Rest In Peace, Sam!

            Comment


              #7
              I used a hex editor to copy header material from a valid jpg to pic2, and got it to open with no complaints, but it's not a picture. It may very well be scrambled. The equality of file size certainly points to that.

              "...moved, backed-up or otherwise saved..." - some backup software may use a format that only it can read. Large copy/move operations can go awry, data getting scrambled and corrupted. If you could retrace the steps in the process that messed up the images, it might be possible at least to know what went wrong and avoid doing it again. As the file is now, there seems to be no way of reclaiming it.
              Its: Belongs to "It"
              It's: Shortened form of "It is"
              ---------------------
              Lose: Fail to keep
              Loose: Not tight

              ---------------------
              Plurals do not require apostrophes

              Comment


                #8
                I'm having the exact same problem as Chrispy35. Random pictures are not accessible on my laptop but are fine on my desktop. There does not seem to be a pattern.

                I'll have to try with another photo viewer and see if it's a Windows problem or an Irfanview issue

                Comment


                  #9
                  this solution helped me:
                  control panel -> Date, Time Language... -> Regional and language options --> in new window click tab 'advanced' and set ' language for non-unicode programs' on the same which you have in 'language bar'.

                  Comment


                    #10
                    Hi Erick,

                    Originally posted by Erick View Post
                    I've attached two example files. I was actually able to track down the same jpg file: the version that opens and the one that has the above-described problem.
                    I tried your file with the Gimp, but with no success. Error message: "Not a JPEG file: starts with 0xe2 0x5e".

                    In fact your bad file is totally corrupted. I used a text editor (Notepad++) to erase all bytes preceding the first occurrence of "ÿØÿá" and saved it. Then it displays as an image, but the bottom of the image is lacking.

                    I hope the problem occured when burning the image to a CD or when reading the CD. If it occured before, when the file was still on your HD, I think the problem is with the file system and/or the hard drive and I suggest to make a backup ASAP and run a scandisk + defrag.

                    Laurent
                    Before you post ... fill in your OS and IV version in your profile.

                    Comment


                      #11
                      I have a similar problem with a seemingly png file. I recovered some jpegs from a recovered flash disk but I can not open them. irfanview gives the error "cant read file header unknown file format or file not found!"

                      I tried to open them with notepad++ and a hexeditor. but my lack of knowledge prevents me to do anything useful

                      I would really appreciate if someone take a look at the file and confirm me that it is hopeless to recover them..

                      thanks..

                      http://ahmetdincer.googlepages.com/f327144.png

                      Comment


                        #12
                        If you recovered some jpegs, how did you end up with a png? Are you saying that all the files will not open that were recovered? Can you tell us why you needed to recover and what program you used to do it?

                        I've had a lot of luck with PhotoRec, a free file recovery program.

                        Comment


                          #13
                          Originally posted by Skippybox View Post
                          If you recovered some jpegs, how did you end up with a png? Are you saying that all the files will not open that were recovered? Can you tell us why you needed to recover and what program you used to do it?

                          I've had a lot of luck with PhotoRec, a free file recovery program.
                          I also used photorec. I recovered the files form an image of my iphone's flash memory.. after the process I ended up with some Jpeg's and png's. They approximately had the same size. That's why I assumed that the png's that I couldn't open were actually broken Jpeg's..

                          the flash memory had been used for I while before I took an image of it and recover the files. so it is possible that some of the files had been overwritten.. still I was hoping that these recovered png's can be fixed.

                          Comment


                            #14
                            Can't Read File Header, Unknown file format

                            I too am suffering from this affliction. I have backed up 1,200 jpg files to CD for a friend using Nero 8. The only thing I can think of is that his pictures were administered by Picasa and I am wondering if this is the nub of the problem. Have any of you who have experienced this problem also been using Picasa?

                            Good luck.

                            Comment


                              #15
                              Can't open JPEG files with any program!

                              Anyone ever figure this one out? I know this is an old thread and I ran across it by accident. I have hundreds of JPEG files that I cannot open with any program. I'm running Windows XP and in picture viewer I get the message that no preview is available. In Internet Explorer I get a small red X. In paint I get an error message also. A friend of mine recommended this program so I downloaded it. When I try to open my JPEG images it says it cannot read the file header. I have been on this problem for a week now to no avail. This all seemed to happen at once. One day it was fine the next day I went to open some pictures and I noticed all the icons were changed to JPEG. I've been over everyone's suggestions and nothing works. The problem seems to be everywhere and in several forums but nobody seems to have an answer. Since my system is set up for automatic updates, I'm thinking the culprit might lie in one of those updates. Possible? I have a little hair left but not much. Please help.

                              Comment

                              Working...
                              X