[Solved/Fixed] Lister tolerant image/file format detection
Moderators: Hacker, petermad, Stefan2, white
[Solved/Fixed] Lister tolerant image/file format detection
I have several JPGs which have a leading CR/LF at the file beginning, before the JPG header. These file are displayed correctly in graphics programs and also in XnView/IrfanView, but not with TC Lister.
Example file for testing can be found here.
Could Lister please be more tolerant and also pass these files to the used graphics viewer?
[Edit: updated title]
Example file for testing can be found here.
Could Lister please be more tolerant and also pass these files to the used graphics viewer?
[Edit: updated title]
Last edited by StatusQuo on 2007-06-22, 19:45 UTC, edited 2 times in total.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
2Lefteous
I suppose you mean the author?
In Lister options I have set XnView/IrfanView to handle "graphics other than BMP", which works with other JPGs.
I just press F3 to load the lister with the file - and get it displayed as binary. Switching to "Image/Multimedia" with key 4 or Options menu doesn't change anything, it's still displayed as binary.
Calling XnView/IrfanView directly with the filename will display it.
[Edit] Quick View (Ctrl-Q) doesn't display these files as image either. [/Edit]
I suppose you mean the author?
In Lister options I have set XnView/IrfanView to handle "graphics other than BMP", which works with other JPGs.
I just press F3 to load the lister with the file - and get it displayed as binary. Switching to "Image/Multimedia" with key 4 or Options menu doesn't change anything, it's still displayed as binary.
Calling XnView/IrfanView directly with the filename will display it.
[Edit] Quick View (Ctrl-Q) doesn't display these files as image either. [/Edit]
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
2StatusQuo

Using the the Lister plug-in SGViewer your test image is displayed fine.
Yes the author of this threadI suppose you mean the author?

I can confirm that it doesn't work when using XnView.In Lister options I have set XnView/IrfanView to handle "graphics other than BMP", which works with other JPGs.
I just press F3 to load the lister with the file - and get it displayed as binary. Switching to "Image/Multimedia" with key 4 or Options menu doesn't change anything, it's still displayed as binary.
Calling XnView/IrfanView directly with the filename will display it.
Using the the Lister plug-in SGViewer your test image is displayed fine.
Thanks, but not confirmed here - also after installing SGViewer 1.9.1 it's still displayed as binary.Lefteous wrote:Using the the Lister plug-in SGViewer your test image is displayed fine.
I have put SGViewer to the top of the plugins, even removed all other lister plugins from the INI and restarted TC - no success.

If viewing a similar named file and then using the next/previous functions of SGView (the green buttons, not the ones in TC's menu), then on the faulty file it displays "[ERROR] test_leading-crlf.jpg" - while XnView would display it, if the file would be passed through to it.
So
, but maybe Lister checks, if the file is really a JPEG, before calling the external viewer?Lister doesn't handle handle JPEG itself
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
Lister plugin Imagine 1.0.0.0 beta 4 ignores the file.
Lister plugin ImgView 1.0 crashes.
Lister plugin SGViewer 1.9.1 ignores the file.
When all image plugins are disabled:
XnView 1.90.3 and IrfanView 4.0 ignores the file when configured as internal viewers in Lister.
Both XnView and IrfanView can show the file when used as external viewers.
Using Imagine as standalone tells that the file format is not supported.
Microsoft Picture and Fax Viewer cannot show the picture either.
I can not make SGViewer work with that file - I have tried in TC 7rc4 and rc5.5 even with a fresh ini-file (with SGViewer as the only installed plugin).
Lister plugin ImgView 1.0 crashes.
Lister plugin SGViewer 1.9.1 ignores the file.
When all image plugins are disabled:
XnView 1.90.3 and IrfanView 4.0 ignores the file when configured as internal viewers in Lister.
Both XnView and IrfanView can show the file when used as external viewers.
Using Imagine as standalone tells that the file format is not supported.
Microsoft Picture and Fax Viewer cannot show the picture either.
I can not make SGViewer work with that file - I have tried in TC 7rc4 and rc5.5 even with a fresh ini-file (with SGViewer as the only installed plugin).
Confirmed!If viewing a similar named file and then using the next/previous functions of SGView (the green buttons, not the ones in TC's menu), then on the faulty file it displays "[ERROR] test_leading-crlf.jpg"
Not confirmed - I can NOT make XNView (nor IrfanView) show the file, not even working my way to it using the N(ext) key.while XnView would display it, if the file would be passed through to it.
Last edited by petermad on 2007-06-04, 01:05 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
I only use Irfan View 4.0 and Imagine 0.9.7.0.
Lister plugin Imagine ignores the file.
Plugin disabled :
IV as internal viewer fails, as external shows the file.
Why would there be a leading-crlf in the first place, I wondered. It doesn't seem to make sense.
This is easy to correct in the meantime.
Convert the file to a uncompressed format like BMP. Save that file back to JPEG, with very high quality,
to limit the losses, and the crlf is gone.
Lister plugin Imagine ignores the file.
Plugin disabled :
IV as internal viewer fails, as external shows the file.
Why would there be a leading-crlf in the first place, I wondered. It doesn't seem to make sense.
This is easy to correct in the meantime.
Convert the file to a uncompressed format like BMP. Save that file back to JPEG, with very high quality,
to limit the losses, and the crlf is gone.
0.618033988
Confirmed - I didn't remember to configure XnView as the default external viewer, this way it now works here, too (standard key = Alt-F3).petermad wrote:When all image plugins are disabled:
XnView 1.90.3 and IrfanView 4.0 ignores the file when configured as internal viewers in Lister.
Both XnView and IrfanView can show the file when used external viewers.
Thanks for testing all this!
Exactly, that's my point. If you call XnView on the command line (d:\path\xnview.exe file.jpg), it will display the file. Unfortunately it does not in TC's Lister.Not confirmed - I can NOT make XNView (nor IrfanView) show the file, not even working my way to it using the N(ext) key.while XnView would display it, if the file would be passed through to it.
So I assume Lister does NOT even (try to) call XnView, otherwise the file should get displayed, shouldn't it?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
Agree, maybe it was some kind of software (old mail program, download manager etc.) did this. Unfortunately they look this way now.Sam_Zen wrote:Why would there be a leading-crlf in the first place, I wondered. It doesn't seem to make sense.
Some text editors will also do (i.e. TextPad: rename to *.txt and remove the first line). But hundreds of files are this way, in a collection of thousands. Additionally I'd like to keep the file dates, so this correction will be a lot of manual work - unneccessary work, because (some) viewers allow viewing them unchanged - it they get the file.This is easy to correct in the meantime.
Convert the file to a uncompressed format like BMP. Save that file back to JPEG, with very high quality,
to limit the losses, and the crlf is gone.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
Strange, what do I do wrong, then?Horst.Epp wrote:Using SGViewer plugin 1.9.1 works fine for me.
It displays the test with F3 and also in Quickview.
Also Irfanview works fine with it.
After XnView/IrfanView both failed on the test file in internal lister, I've set up SGViewer as first lister plugin. It displays "normal" JPGs, but not this test jpg (and the others in same style) - the newest SGViewer version 1.9.1 even displays an [ERROR] (as mentioned above).
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
Well, maybe XnView/IrfanView are not called (when used as internal viewers) - but it seems that the plugin ImgView is called and tries to read the file, since it comes up with an error message and crashes.So I assume Lister does NOT even (try to) call XnView
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
So viewers available as TC plugins (like ImgView) seem not to be able to display this problematic files.petermad wrote:Well, maybe XnView/IrfanView are not called (when used as internal viewers) - but it seems that the plugin ImgView is called and tries to read the file, since it comes up with an error message and crashes.So I assume Lister does NOT even (try to) call XnView
XnView/IrfanView would be able to, but are only available as EXE, not as TC plugin - and as those they are not called by TC.
For testing purpose I've replaced the entry for XnView (in internal Lister's options) with another program (i.e. calc.exe) and removed all lister plugin entries.
Result: With a normal JPG calc.exe is started, on the test-JPG (with added CR/LF at the beginning) it is not.

Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
This is because TC analysizes the Header of the file and sees that its NOT an JPEGStatusQuo wrote:For testing purpose I've replaced the entry for XnView (in internal Lister's options) with another program (i.e. calc.exe) and removed all lister plugin entries.
Result: With a normal JPG calc.exe is started, on the test-JPG (with added CR/LF at the beginning) it is not.

Hoecker sie sind raus!
Very right. And TC analyzes first because it's another protocol.
The proof of this can be seen in the representation. If it's shown with a plugin like Imagine, the full implementation
is shown, with all the edit-possibilities.
If, as internal viewer, IV is used, then the app is not available. Only the reading is transferred to the lister window.
The proof of this can be seen in the representation. If it's shown with a plugin like Imagine, the full implementation
is shown, with all the edit-possibilities.
If, as internal viewer, IV is used, then the app is not available. Only the reading is transferred to the lister window.
0.618033988