Not a bug - Lister doesn't show WMF files as images

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Not a bug - Lister doesn't show WMF files as images

Post by *Slavic »

By default, viewing Windows Metafiles is switched off in Lister due to old Windows bug (Windows Metafile vulnerability which was fixed in 2006). Lister section in TC manual advises to add the line

Code: Select all

WmfAllowed=3
to the wincmd.ini [Configuration]. Also the parameter 1 should allow viewing WMF, however, they don't work. Attempt to switch Lister format to Image/Multimedia has no effect.

Tested with some images from WMF library in MS Office 2013. Also used a free sample (big red crown) in WMF format here: https://www.armsandbadges.com/sample.htm. All WMF files can be properly opened in classic MS Paint, e.g. from Windows 8.1.
Last edited by Slavic on 2021-04-30, 15:46 UTC, edited 1 time in total.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Lister doesn't show WMF files as images

Post by *Horst.Epp »

There is no problem viewing .wmf files in actual TC beta.
I have no WmfAllowed in my wincmd.ini
and no problem to show your .wmf sample file
using the Photoviewer TC lister plugin.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Lister doesn't show WMF files as images

Post by *petermad »

2Slavic
TC does not support viewing of other file formats than BMP, PNG, GIF and JPG without the help of either a plugin or Irfanwiew/XnView
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Lister doesn't show WMF files as images

Post by *Slavic »

Horst.Epp wrote: 2021-04-13, 15:54 UTC There is no problem viewing .wmf files in actual TC beta [...] using the Photoviewer TC lister plugin.
Sure, in such configuration you see WMF in this plugin rather than in built-in Lister. For true beta test, need to check as many configurations as possible starting from "bare installation". For example, also I prefer to add the XnView to stable TC, but intentionally haven't added it to TC beta.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Lister doesn't show WMF files as images

Post by *Slavic »

petermad wrote: 2021-04-13, 22:18 UTC 2Slavic
TC does not support viewing of other file formats than BMP, PNG, GIF and JPG without the help of either a plugin or Irfanwiew/XnView
Please look at two sections in the TC manual:
  • The internal file lister (F3) > Note (near the begin)
  • Ini File Settings part 1: Configuration > WmfAllowed=-1 (near the end)
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Lister doesn't show WMF files as images

Post by *petermad »

Ini File Settings part 1: Configuration > WmfAllowed=-1 (near the end)
That doesn't mean that wmf files are supported internally, only whether TC will pass wmf files to plugins or Irfanview or not.

Help wrote:The internal file lister (F3)

The integrated file lister allows you to view files of almost any size (up to 2^63 bytes = 8192 petabytes) in text, Unicode, HTML, binary or hex format, bitmap graphics (bmp, jpg, gif, png), multimedia files, and also RTF files.

Lister originally only supported BMP files internally:
history.txt wrote:23.03.99 Release Windows Commander 4.0 Beta2

24.08.98 Added: BMP viewer
Help wrote:Here is a list of the most important additions in Commander 4.0:

- Bitmap viewer in Lister, additional formats through Irfanview

Later in August 2011 PNG, GIF and JPG files were added:
Help wrote:New functions and fixes in Total Commander 8.0 beta 1:

- Lister: Show jpg, gif and png images in Lister without plugins
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Lister doesn't show WMF files as images

Post by *Slavic »

petermad wrote: 2021-04-13, 22:37 UTC That doesn't mean that wmf files are supported internally, only whether TC will pass wmf files to plugins or Irfanview or not.
Hmm... Maybe technically you are right, the code for showing WMF is not included in Lister yet. Very persistent and curious users, besides the search in history.txt, may also search this forum and see, for example, this:
ghisler(Author) wrote: 2011-10-05, 10:43 UTC GIF will be supported in beta 4.

WMF and EMF are not supported by Lazarus, probably because they are not portable, or because of the risk to have another bug in the play functions. Currently I don't plan to port them to 64-bit.

The transparent WMF/EMF problem already exists in TC 7.56a. I will check whether I can handle that somehow.
But the TC ability to support the formats like WMF/EMF only by external plugins is a logical conclusion rather than direct information. In the section The internal file lister (F3) which I mentioned above the word plugin does not exist at all; contrary, the note of WMF images immediately follows the general information about Lister. Typical user may only guess whether the mentioned image list is strictly limited or extensible.

If so, it's not a Lister code bug rather an inconsistency in the Lister help section of TC manual. It can be improved, for example, this way:
...the rest is automatically loaded when scrolling through the text. All other image formats (TIFF, WEBP, WMF, etc...) are not supported by Lister internally and require the external plugins; without them, Lister will show the images as binary files.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
Post Reply