error opening file - (file included)
Moderators: XnTriq, helmut, xnview
-
- Posts: 13
- Joined: Sat Jun 23, 2012 9:50 pm
error opening file - (file included)
hi all, i have a serious issue (not necessarily with xnview) and i need your help to find the cause
history
i recently installed windows 7 pro x64 von a new hard drive and i placed some pictures in the Pictures folder and in other folders as well
i installed several windows updates and xnview
i used 'choose default program' (~'always open with') in order to associate some files with xnview on the fly
problem
today i noticed that some of the thumbnails in my Pictures folder (so far only that folder, and only the ones for the bmp files) were empty
i tried to open/view the images but i couldn't, here are the error warnings i got:
windows photo viewer - can't open this picture because the file appears to be damaged, corrupted, or is too large
xnview - warning error reading the file
questions
1) why is it that irfanview and web browers can open this file while windows photo viewer and xnview can't
2) why is the file corrupt and what can have caused that? i read about windows 7 bugs causing file corruption (wow...nice os) but this is very serious bcz i have other files i need
any suggestions are welcome, thank you for your time,
one of the corrupted images: http://desmond.imageshack.us/Himg6/scal ... es=landing
history
i recently installed windows 7 pro x64 von a new hard drive and i placed some pictures in the Pictures folder and in other folders as well
i installed several windows updates and xnview
i used 'choose default program' (~'always open with') in order to associate some files with xnview on the fly
problem
today i noticed that some of the thumbnails in my Pictures folder (so far only that folder, and only the ones for the bmp files) were empty
i tried to open/view the images but i couldn't, here are the error warnings i got:
windows photo viewer - can't open this picture because the file appears to be damaged, corrupted, or is too large
xnview - warning error reading the file
questions
1) why is it that irfanview and web browers can open this file while windows photo viewer and xnview can't
2) why is the file corrupt and what can have caused that? i read about windows 7 bugs causing file corruption (wow...nice os) but this is very serious bcz i have other files i need
any suggestions are welcome, thank you for your time,
one of the corrupted images: http://desmond.imageshack.us/Himg6/scal ... es=landing
-
- Author of XnView
- Posts: 39863
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: error opening file - (file included)
you can disable option/Read>Ignore read errors
But this file seems to have a premature end of file
But this file seems to have a premature end of file
Pierre.
-
- Moderator & Librarian
- Posts: 6183
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: error opening file - (file included)
Welcome to the forum, sklnner (o:
XnView is able to display the file if you go to Tools » Options... » General » Read/Write » General and activate the Ignore read errors setting.
Edit: Ack, Pierre was faster!
You may also want to run the Remove alpha channel command in the Image menu to fix the BMP.
The URL of the link you posted (desmond.imageshack.us/Himg6/scaled.php?server=6&filename=hondaflyingcar4.bmp&res=landing) is suggesting that ImageShack downsizes the picture.
Could you compress the file and upload the ZIP archive as an attachment to the forum?
XnView is able to display the file if you go to Tools » Options... » General » Read/Write » General and activate the Ignore read errors setting.
Edit: Ack, Pierre was faster!
You may also want to run the Remove alpha channel command in the Image menu to fix the BMP.
The URL of the link you posted (desmond.imageshack.us/Himg6/scaled.php?server=6&filename=hondaflyingcar4.bmp&res=landing) is suggesting that ImageShack downsizes the picture.
Could you compress the file and upload the ZIP archive as an attachment to the forum?
-
- Moderator & Librarian
- Posts: 6183
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: error opening file - (file included)
Other methods I use to prevent XnView from hiding corrupted images in the browser:
- Tools » Options... » Browser » File List » Misc
- Deactivate Recognize only by extension
- Set Scan file headers in folders to Always
[ z00m ]
-
- Posts: 13
- Joined: Sat Jun 23, 2012 9:50 pm
Re: error opening file - (file included)
first of all, thank you all for your help and time and tips (which solved the file opening part of the issue), and sry for the delay
atm i don't have the right to upload attachments in the forum but as far as i could see the ImgSh img behaved in the same way and that's why i linked it
now, i understand this is not a win support forum, but my concern was not so much about xnview not opening the files, but about file corruption
you see im in the middle of a transfer to win 7 x64 from win xp x64, on a business workstation with important stuff inside
at first i rejected vista and never used it but now im regretting installing win 7, im having major problems with the smallest functions and it's not a fresh untested os
so, i wanted your opinion on that matter, bcz you know more about image files than anyone else
could this be some minor problem like a random problem while changing file associations or am i dealing with common file corruption which means systemic file corruption caused by the os / the hard drive / the memory?
i understand you are not its, im asking for opinions
again thank you
atm i don't have the right to upload attachments in the forum but as far as i could see the ImgSh img behaved in the same way and that's why i linked it
now, i understand this is not a win support forum, but my concern was not so much about xnview not opening the files, but about file corruption
you see im in the middle of a transfer to win 7 x64 from win xp x64, on a business workstation with important stuff inside
at first i rejected vista and never used it but now im regretting installing win 7, im having major problems with the smallest functions and it's not a fresh untested os
so, i wanted your opinion on that matter, bcz you know more about image files than anyone else
could this be some minor problem like a random problem while changing file associations or am i dealing with common file corruption which means systemic file corruption caused by the os / the hard drive / the memory?
i understand you are not its, im asking for opinions
again thank you
-
- Moderator & Librarian
- Posts: 6183
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: error opening file - (file included)
Note: I do have access to PCs running Windows 7, but I'm not a Windows 7 user per se.
I can't think of any scenario where a Windows update would cause file corruption or data loss in BMP images and BMPs only.
What's striking about your sample: It has an alpha channel which is of no apparent use
Where did this image come from? Is it a screenshot or an e-mail attachment?
I assume this is one of the hotfixes you were referring to in your initial post:
I can't think of any scenario where a Windows update would cause file corruption or data loss in BMP images and BMPs only.
What's striking about your sample: It has an alpha channel which is of no apparent use

Where did this image come from? Is it a screenshot or an e-mail attachment?
I assume this is one of the hotfixes you were referring to in your initial post:
MSKB ([url=http://support.microsoft.com/kb/976092]An update is available to fix a data corruption issue for Secure Digital (SD) cards in Windows 7[/url] wrote:Issues that this update fixes
You have an NTFS-formatted SD card. You use Advanced Direct Memory Access (ADMA) to transfer data between the SD card and a computer that is running Windows 7. However, during this operation, the data on the SD card may be corrupted. Additionally, unexpected problems may occur when you try to use the affected data.
During an ADMA transfer process, the Secure Digital Bus Driver (Sdbus.sys) converts the DMA data structure of the operating system to the ADMA data structure of the SD card. The DMA and the ADMA data structures are also known as descriptor tables. A descriptor table contains a data length value and a buffer address. The data-length field is 16-bit, and it has a maximum size of 64 kilobytes (KB). However, during the data conversion process, the Sdbus.sys driver does not check the buffer size in the descriptor table of the system. Therefore, the Sdbus.sys driver may set an incorrect data length in the SD descriptor table. For example, the Sdbus.sys driver may set the data length to something longer than 0xFFFF. Also, I/O corruption occurs, in this scenario. This, in turn, causes data corruption.
-
- Posts: 133
- Joined: Fri Apr 10, 2009 9:55 pm
Re: error opening file - (file included)
Byte 0x000A in this file is 0x3A, which is incorrect. It should be 0x36.
Change it to 0x36 and you will be able to open the file in XnView.
Change it to 0x36 and you will be able to open the file in XnView.
-
- Moderator & Librarian
- Posts: 6183
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: error opening file - (file included)
Thanks! Very interesting, MaxStMaxSt wrote:Byte 0x000A in this file is 0x3A, which is incorrect. It should be 0x36.

Does this mean that some program saved the BMP with a wrong color depth info (24- vs. 32-bit) in the file's header?
Do you know a utility like JPEGsnoop or TweakPNG for BMPs?
- Wikipedia: BMP file format
-
- Posts: 133
- Joined: Fri Apr 10, 2009 9:55 pm
Re: error opening file - (file included)
XnView supports 32-bit in BMP.
0x36 is the correct size of the BMP header (54 bytes).
You can see it in the Example 1 in that article:
http://en.wikipedia.org/wiki/BMP_file_format#Example_1
0x36 is the correct size of the BMP header (54 bytes).
You can see it in the Example 1 in that article:
http://en.wikipedia.org/wiki/BMP_file_format#Example_1
-
- Moderator & Librarian
- Posts: 6183
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: error opening file - (file included)
Yes, I'm aware of that. It's just that I expected the all-white alpha channel to be gone after fixing the bitmap's header with a hex editor, but it's still there.MaxSt wrote:XnView supports 32-bit in BMP.
8<–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
- Anton “Karpolan” Karpenko: BMP Header Remover
- LaserCottage.com: Software (404)
Dave Johnson29 (Sawmill Creek Woodworkers Community » [url=http://www.sawmillcreek.org/showthread.php?102400&p=1028285#post1028285]FREE software for .BMP Header info.[/url]) wrote:Hi All,
As promised in the
http://www.sawmillcreek.org/showpost.php?p=1026436
There is a FREE program for displaying the actual header information for a Windows .BMP file. Go to my website www.lasercottage.com and click the Software link.
If you read posts #18
http://www.sawmillcreek.org/showpost.ph ... stcount=18
If you read posts #20
http://www.sawmillcreek.org/showpost.ph ... stcount=20
If you read posts #23 all will become clear.
http://www.sawmillcreek.org/showpost.ph ... stcount=23
I hope this helps save messing up picture details when there is no DPI information contained in the file. I will try and add other file headers (if they have them, some do some do not) as time comes available.
-
- Moderator & Librarian
- Posts: 6183
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: error opening file - (file included)
WinDiff of bmpdump's output:David Tribble ([url=http://david.tribble.com/programs.html]Programs[/url]) wrote:bmpdump.exe
Dumps the contents of a BMP bitmap image file in hexadecimal form.
[source code]
-
- Posts: 13
- Joined: Sat Jun 23, 2012 9:50 pm
Re: error opening file - (file included)
hi, i apologize for the absence from my own thread
we are upgrading and i had no internet access during the last days
first of all, as it's been already stated, the symptoms of the problem have been dealt with, in various ways
1: xnview opens the files using the ignore errors setting and most importantly 2: saving the files also fixes the files permanently
that's why i feared of generalized file corruption and came here to seek help (and not bcz of these unimportant images)
but indeed, thus far i haven't found any other malfunctioning files and the system doesn't seem to be having any issues so it should be just these bmps
they were not modified or edited and the only actions affecting them would be 1 windows thumbnail procedures and 2 personalize/wallpaper procedures
EDIT: the images were fully functional in opening, in thumbnails, in desktop as wallpapers
in any case i 've come to believe that indeed the only files affected were these images which means the problem is minor and academic
now that we know what's the problem with the file (btw thank you.. - at first i was researching the problem by myself but since i didn't know the procedural terms, i couldn't find what kind of programs i must use to get the bmp data i read about on some wikipedia articles), can we tell if this could be caused by thumnail / personlize / or file association procedures? i don't know much but i can't see why these procedures could modify the files in anyway
there are other image programs installed, but they have nothing to do with these images
again thank you very much for your help
ps: no the articles i was referring to, were describing stationary windows 7 hard drive files getting corrupted - not files getting transferred from an SD card, but i found some misconceptions in these articles, the official ms article was not referring to a stable windows 7 release
we are upgrading and i had no internet access during the last days
first of all, as it's been already stated, the symptoms of the problem have been dealt with, in various ways
1: xnview opens the files using the ignore errors setting and most importantly 2: saving the files also fixes the files permanently
as i said/wrote, i didn't know if the bmps were the only corrupted filesXnTriq wrote:I can't think of any scenario where a Windows update would cause file corruption or data loss in BMP images and BMPs only.
that's why i feared of generalized file corruption and came here to seek help (and not bcz of these unimportant images)
but indeed, thus far i haven't found any other malfunctioning files and the system doesn't seem to be having any issues so it should be just these bmps
the images were downloaded from the internet after a windows 7 installation (i though i should get some wallpaper images with the upgrade)XnTriq wrote:What's striking about your sample: It has an alpha channel which is of no apparent use
Where did this image come from? Is it a screenshot or an e-mail attachment?
they were not modified or edited and the only actions affecting them would be 1 windows thumbnail procedures and 2 personalize/wallpaper procedures
EDIT: the images were fully functional in opening, in thumbnails, in desktop as wallpapers
in any case i 've come to believe that indeed the only files affected were these images which means the problem is minor and academic
now that we know what's the problem with the file (btw thank you.. - at first i was researching the problem by myself but since i didn't know the procedural terms, i couldn't find what kind of programs i must use to get the bmp data i read about on some wikipedia articles), can we tell if this could be caused by thumnail / personlize / or file association procedures? i don't know much but i can't see why these procedures could modify the files in anyway
there are other image programs installed, but they have nothing to do with these images
again thank you very much for your help
ps: no the articles i was referring to, were describing stationary windows 7 hard drive files getting corrupted - not files getting transferred from an SD card, but i found some misconceptions in these articles, the official ms article was not referring to a stable windows 7 release
-
- Moderator & Librarian
- Posts: 6183
- Joined: Sun Sep 25, 2005 3:00 am
- Location: Ref Desk
Re: error opening file - (file included)

Windows 7 Forums ([url=http://www.vistax64.com/1070635-post10.html]Windows 7 - File Corruption issues[/url]) wrote:Wonderful Microsoft Security Essentials is causing the issue. I have to shutoff realtime protection in order to use/download/copy any zip or self extracting file and have it be usable on the computer.
Vista Forums ([url=http://www.vistax64.com/vista-general/142407-corruption-images-thumbnail-view.html#post663072]Corruption of Images on Thumbnail View[/url]) wrote:Recently, I have ended up with damaged and/or destroyed JPEG images due to the thumbnail icon feature and/or Photo Gallery. The condition can be created as follows:
1. Browse to a folder containing JPEG images.
2. Do nothing... as Vista generates the thumbnails, it struggles, and only "half" of it is created (see below).
3. When the image is opened, it is corrupted.
My understanding is that generating a thumbnail should not alter the original image in anyway. However, a thumbnail that was generated fine once before for an image that was fine once before...
Vista Forums ([url=http://www.vistax64.com/1070635-post10.html]Re: Corruption of Images on Thumbnail View[/url]) wrote:I am experiencing the same problem. I was viewing thumbnails of JPG files over a network share, opened a few within Windows Photo Gallery - and on close (clicking the X) Photo Gallery corrupted the files. I am using Vista Home Premium 64bit SP1. I have been looking all over the forums for an answer - and although I have seen posts dating back to the release of VISTA, I have seen no solutions. I am afraid to use the VISTA machine to look at photos as the corruption occurred when the original files shouldn't have been altered at all (closing a file should not equal a file save).
Are these hotfixes installed on your system?Microsoft TechNet Forums ([url=http://social.technet.microsoft.com/Forums/fi-FI/w7itprogeneral/thread/df935a52-a0a9-4f67-ac82-bc39e0585148]Getting ERROR_FILE_CORRUPT when moving a file... Result: Chkdsk at reboot (Reproducable and confirmed)[/url]) wrote:This is a known regression in Windows 7 in the NTFS file system. It occurs when doing a superceding rename over a file that has an atomic oplock on it (atomic oplocks are a new feature in Windows 7). The indexer uses atomic oplocks which is why it helped when you disabled the indexer. Explorer also uses atomic oplocks which is why you are still seeing the issue. When this occurs STATUS_FILE_CORRUPT is incorrectly returned and the volume is marked "dirty" which is a signal to the system that chkdsk needs to be run. No actual corruption has occured.
- File corruption may occur if you run a program that uses a file system filter driver in Windows 7, Windows Server 2008 R2, Windows Vista, or Windows Server 2008
- One or more volumes are corrupted on a hard disk when a dump file is saved on a computer that is running Windows 7 or Windows Server 2008 R2 if the hard disk space is larger than 2 terabytes
- File corruption occurs when you perform file operations on a file server that is running Windows 7 or Windows Server 2008 R2
-
- Posts: 13
- Joined: Sat Jun 23, 2012 9:50 pm
Re: error opening file - (file included)
surpsiringly my unreasonable guess (by exclusion) seems to be possible
i did some more research trying to distinguise the similar but different windows file corruption issues reported all around the internet
indeed there seems to be an image specific corruption issue but i have to the conclusion that it is isolated to the pictures library and folders
in all the other reports i read about, the users were using these default directories
i on the other hand, besides the wallpapers stored in the my pictures folder, have about 30 thousand images in a separate personal folder and i have not encountered any problem yet (hopefully i will not in the future either...)
the problem is not general data corruption therefore and i don't think it is been caused by thumnail creation either, bcz the thumnail have been generated for my personal folder too
so now, my guess is that it has to do with windows photo viewer, personalize, or the pictures library complicated functions and abilities
the problem resides somewhere over there
-
i believe the hotfixes you quoted are all applied atm, but i don't know at which point they were applied, before or after the problem
-
anyway case closed, i don't see if there is nothing we can do besides describing the issue
hopefully i haven't just wasted your time for nothing and other ppl who come accross the same problem will get some additional information
again thnx for your help
i did some more research trying to distinguise the similar but different windows file corruption issues reported all around the internet
indeed there seems to be an image specific corruption issue but i have to the conclusion that it is isolated to the pictures library and folders
in all the other reports i read about, the users were using these default directories
i on the other hand, besides the wallpapers stored in the my pictures folder, have about 30 thousand images in a separate personal folder and i have not encountered any problem yet (hopefully i will not in the future either...)
the problem is not general data corruption therefore and i don't think it is been caused by thumnail creation either, bcz the thumnail have been generated for my personal folder too
so now, my guess is that it has to do with windows photo viewer, personalize, or the pictures library complicated functions and abilities
the problem resides somewhere over there
-
i believe the hotfixes you quoted are all applied atm, but i don't know at which point they were applied, before or after the problem
-
anyway case closed, i don't see if there is nothing we can do besides describing the issue
hopefully i haven't just wasted your time for nothing and other ppl who come accross the same problem will get some additional information
again thnx for your help