[11.00] Can't view certain BMP files

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

siealex
Senior Member
Senior Member
Posts: 290
Joined: 2009-03-22, 16:36 UTC

[11.00] Can't view certain BMP files

Post by *siealex »

Recently I purchased a new pocket oscilloscope that can save screenshots to BMP files. These files are opened perfectly in MS Paint, but cannot be viewed in Lister: it shows them as text. Is it a TC fault or something wrong with the files?
We are not so S.M.A.R.T. as we imagine...
User avatar
white
Power Member
Power Member
Posts: 5174
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [11.00] Can't view certain BMP files

Post by *white »

Confirmed for 32-bit TC only. 64-bit TC works fine.

Pressing 8 (Explorer Preview) does display them.
siealex
Senior Member
Senior Member
Posts: 290
Joined: 2009-03-22, 16:36 UTC

Re: [11.00] Can't view certain BMP files

Post by *siealex »

Yes, the 64-bit version works fine.
PS, in 32-bit TC, these files can be viewed in mode "8" (via Explorer), but not in mode "4" (Graphics/Multimedia). The only temporary solution is to set mode "8" permanently for this file type.
We are not so S.M.A.R.T. as we imagine...
User avatar
petermad
Power Member
Power Member
Posts: 15479
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [11.00] Can't view certain BMP files

Post by *petermad »

Confirmed for 32-bit TC only. 64-bit TC works fine.
Same here. The files can be showed with the Imagine and the slister plugins (32 and 64bit), but NOT with the PhotoViewer plugin (32 and 64bit

In 32bit TC I can also see the images with the SGViewer and imgView plugins.
License #524 (1994)
Danish Total Commander Translator
TC 11.50b4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1383a
TC 3.60b4 on Android 6, 13 & 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.00] Can't view certain BMP files

Post by *ghisler(Author) »

Both images show up just fine here on Windows 11, also with Total Commander 32-bit (internal viewer, no plugins). Can you provide more information?
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5174
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [11.00] Can't view certain BMP files

Post by *white »

Windows 11 Pro, build 22621.2134
Total Commander 32-bit with new ini (so internal viewer, no plugins).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.00] Can't view certain BMP files

Post by *ghisler(Author) »

Did you choose menu Plugins -> Internal?
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5174
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [11.00] Can't view certain BMP files

Post by *white »

ghisler(Author) wrote: 2023-08-15, 08:45 UTC Did you choose menu Plugins -> Internal?
That does the same as pressing 4, nothing.

Please note that it is specific for the BMP files given by siealex.
User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [11.00] Can't view certain BMP files

Post by *AntonyD »

Confirmed bug too. Win10 22H2.
32 bit TC Lister in internal variant of viewing of exactly these files given by siealex - cannot interpret
them as a simple windows BMP format and so tries to show them only as a Binary (mode 2) text.
64 bit Lister does the job - it shows them as a picture.

P.S. IF I will use option "IrfanView/XnView to load graphics other than BMP" - then and 32 bit Lister
will show these BMP properly.
#146217 personal license
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [11.00] Can't view certain BMP files

Post by *ghisler(Author) »

Seems like the 32-bit version sent the image to Irfanview to load it after failing to load it internally.
I have checked the problem in the debugger, and it seems that the image has an invalid header size.
See bitmapinfoheader structure.
biSize
Specifies the number of bytes required by the structure. This value does not include the size of the color table or the size of the color masks, if they are appended to the end of structure.
The image reports a header size of 56 bytes, which seems to include the size of the color table. The actual header size is 40 bytes.
The decoder in the 64-bit version doesn't seem to care, so I will change the Delphi code to look for header sizes >=40 bytes.
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1561
Joined: 2004-07-08, 08:58 UTC

Re: [11.00] Can't view certain BMP files

Post by *JOUBE »

Not confirmed.

TC11 32bit with fresh.ini, W10 22H2

Usual bmp are displayed with F3.

The OP's two images are actually not shown. But what do they have for an identifier: BMHX instead of BMP. BMP is probably evaluated by the internal lister, while others (wrongly?) don't. I have no time enough at the moment to check, wether BMHX is a well known identifier or not.
Last edited by JOUBE on 2023-08-15, 09:37 UTC, edited 7 times in total.
massor
Junior Member
Junior Member
Posts: 26
Joined: 2022-05-01, 18:30 UTC

Re: [11.00] Can't view certain BMP files

Post by *massor »

I don't know if we have to bother so much with poor export implementations of some equipment that don't care about the standards. I've have seen a lot of these who cannot be properly read but with their own software, even if it seems to be a common filetype. I guess you cannot keep up with all malformed file types. Maybe tomorrow another user complaints about another shady file it cannot read. Just find and use a plugin that is the most "forgiving" and that's it... Just my 2 cents.
User avatar
AntonyD
Power Member
Power Member
Posts: 1376
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: [11.00] Can't view certain BMP files

Post by *AntonyD »

2JOUBE
But what do they have for an identifier: BMHX instead of BMP.
You will be surprised as I see - but proper signature is the only first 2 byte!
so only 'BM' does matter! All other bytes explain another things:
https://en.wikipedia.org/wiki/BMP_file_format#Bitmap_file_header
http://www.ue.eti.pg.gda.pl/fpgalab/zadania.spartan3/zad_vga_struktura_pliku_bmp_en.html
#146217 personal license
JOUBE
Power Member
Power Member
Posts: 1561
Joined: 2004-07-08, 08:58 UTC

Re: [11.00] Can't view certain BMP files

Post by *JOUBE »

AntonyD wrote: 2023-08-15, 10:53 UTC You will be surprised[
Not really, because, for example, a plugin that I'm very familiar with handles it quite correctly. So, searching for a reason...
Post Reply