Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21

Thread: Can't Read File Header, Unknown file format

  1. #1
    IV Newbie
    Join Date
    Jun 2007
    Posts
    4
    OS
    Win Vista Home Basic

    Default 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. #2
    Advanced User matera's Avatar
    Join Date
    May 2006
    Location
    3 miles below poverty level
    Posts
    1,384
    Version
    IrfanView 4.37
    OS
    32-bit Linux Distribution
    CPU Cores
    2

    Default

    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 at 02:46 AM. Reason: typo lol

  3. #3
    Moderator Sam_Zen's Avatar
    Join Date
    May 2007
    Location
    NL
    Posts
    1,897
    Version
    IrfanView 4.27
    OS
    Win XP Home SP1
    CPU Cores
    1

    Default

    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!

  4. #4
    IV Newbie
    Join Date
    Jun 2007
    Posts
    1
    OS
    Win Vista Home Basic

    Default

    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.

  5. #5
    IV Newbie
    Join Date
    Jun 2007
    Posts
    4
    OS
    Win Vista Home Basic

    Default 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 Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Pic 1 that works.jpg 
Views:	1271 
Size:	218.3 KB 
ID:	38  
    Attached Files Attached Files

  6. #6
    Moderator Sam_Zen's Avatar
    Join Date
    May 2007
    Location
    NL
    Posts
    1,897
    Version
    IrfanView 4.27
    OS
    Win XP Home SP1
    CPU Cores
    1

    Default

    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 at 04:12 AM.
    0.6180339887
    Rest In Peace, Sam!

  7. #7
    Advanced User matera's Avatar
    Join Date
    May 2006
    Location
    3 miles below poverty level
    Posts
    1,384
    Version
    IrfanView 4.37
    OS
    32-bit Linux Distribution
    CPU Cores
    2

    Default

    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.

  8. #8
    IV Newbie
    Join Date
    Jul 2007
    Posts
    1
    OS
    Win Vista Home Basic

    Default

    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

  9. #9
    IV Newbie
    Join Date
    Apr 2008
    Location
    poland
    Posts
    1

    Default

    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'.

  10. #10
    Moderator Laurent's Avatar
    Join Date
    May 2007
    Location
    Brussels, Belgium
    Posts
    882
    Version
    IrfanView 4.25
    OS
    32-bit Win XP Pro SP3
    CPU Cores
    2

    Default

    Hi Erick,

    Quote 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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •