b1: Bugs in file recognition config

Bugs and Issues in 1.82 Test versions which have been fixed and verified as resolved.

Moderators: XnTriq, xnview

Xyzzy
Posts: 652
Joined: Tue Nov 23, 2004 10:17 pm
Location: Poland

b1: Bugs in file recognition config

Post by Xyzzy » Mon Dec 12, 2005 10:18 am

Hello!

So we have 2 options for file recognition- Recognize only by extension and Scan file headers in folders.

1. If Recognize only by extension is checked, the files should be recognized only by extension (it's what the option says at least). It is not true :!: since in Details mode, for a JPG renamed to BMP the Type column says JPEG TrueColor. Some header scanning is used and should not.

2. If Recognize only by extension is checked AND Scan file headers is Never, files are not recognized (fe. no info in Type column). They should be, as Recognize only by extension is checked and extensions match file types.

X.

User avatar
xnview
Author of XnView
Posts: 33615
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: b1: Bugs in file recognition config

Post by xnview » Mon Dec 12, 2005 11:28 am

Xyzzy wrote:1. If Recognize only by extension is checked, the files should be recognized only by extension (it's what the option says at least). It is not true :!: since in Details mode, for a JPG renamed to BMP the Type column says JPEG TrueColor. Some header scanning is used and should not.
I confirm
2. If Recognize only by extension is checked AND Scan file headers is Never, files are not recognized (fe. no info in Type column). They should be, as Recognize only by extension is checked and extensions match file types.
Hum no, if scan file headers is never, even if extension is good, the info will not be extracted...
Pierre.

Xyzzy
Posts: 652
Joined: Tue Nov 23, 2004 10:17 pm
Location: Poland

Post by Xyzzy » Mon Dec 12, 2005 12:05 pm

Ok, I think I improperly used displaying of file type in Type column as indicator if file is recognized.

Additionaly, I assume that Scan file headers in folders is used for file type recognition.

So, using Use Colour option, file list in List mode:

Recognize... checked, Scan file... Always - JPEG enamed to BMP is coloured like JPEG, and should be like BMP (because it is what Recognize ONLY by extension says). Edit: After deleting .ini and retry, JPEG renamed do BMP is not coloured at all, and should be like BMP.

Recognize... checked, Scan file... Never - files are not coloured, and they should (extensions are OK).

Edit: Cache must be turned off for testing these two!

Another bug I think: in List mode colouring disappears after switching to another directory. To reproduce:
Check Use Colour
Go to directory with images, View as anything but List
Switch to List
Click in tree another directory with images- colouring disappears and should not.

X.
Last edited by Xyzzy on Thu Dec 22, 2005 9:30 am, edited 1 time in total.

Xyzzy
Posts: 652
Joined: Tue Nov 23, 2004 10:17 pm
Location: Poland

Post by Xyzzy » Mon Dec 12, 2005 1:00 pm

I think there is another problem to it:
When playing with recognition settings, very often XnView starts do display image files in external viewer!
After playing a bit more it starts to behave properly again, even when the options are the same.

X.

User avatar
xnview
Author of XnView
Posts: 33615
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Mon Dec 12, 2005 8:05 pm

Xyzzy wrote:I think there is another problem to it:
When playing with recognition settings, very often XnView starts do display image files in external viewer!
After playing a bit more it starts to behave properly again, even when the options are the same.
Do you have always the problem, open in external viewer is done by "open action"
Pierre.

Xyzzy
Posts: 652
Joined: Tue Nov 23, 2004 10:17 pm
Location: Poland

Post by Xyzzy » Tue Dec 13, 2005 8:44 am

So far I haven't noticed any pattern. When it happens, all methods of opening (Open toolbar button, double-click, RMB->Open) open image in external viewer. I associate the problem with file recognition settings, as I have opening 'Other' files set to external viewer, but as I said, I cannot find any repeatable pattern :(

EDIT: I think marsh writes about it in "b1: Browser to fullscreen stopped working"

X.

Xyzzy
Posts: 652
Joined: Tue Nov 23, 2004 10:17 pm
Location: Poland

Post by Xyzzy » Tue Dec 27, 2005 9:34 am

Detailes steps to reproduce.

Directory with JPEG file with extension changed to BMP and another JPEG file, with OK extension.

Deleted INI. Deleted cache contents. Run XnView.

Double click renamed file- displays in external Windows viewer - BAD, it should be opened in Xnview, because BMP should be recognized as image type by extension and action for image files is Open in XnView.
Change to List mode.
Renamed file is not coloured at all- BAD, it should be coloured as BMP file.
Changed Scan file headers to Never. Closed XnView. Deleted cache contents, Started XnView.
Files are not coloured at all- BAD, they should be coloured as BMP and JPEG file, according to 'Recognize only be extension'.
Closed XnView. Deleted INI, Started XnView.
Go to ANY directory with images. Files are coloured OK. Now switch file list to List. Go to another directory with images. Files are not coloured- BAD, they should.

X.

User avatar
xnview
Author of XnView
Posts: 33615
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Wed Dec 28, 2005 9:00 am

Xyzzy wrote:Detailes steps to reproduce.

Directory with JPEG file with extension changed to BMP and another JPEG file, with OK extension.

Deleted INI. Deleted cache contents. Run XnView.

Double click renamed file- displays in external Windows viewer - BAD, it should be opened in Xnview, because BMP should be recognized as image type by extension and action for image files is Open in XnView.
Change to List mode.
Renamed file is not coloured at all- BAD, it should be coloured as BMP file.
Changed Scan file headers to Never. Closed XnView. Deleted cache contents, Started XnView.
Files are not coloured at all- BAD, they should be coloured as BMP and JPEG file, according to 'Recognize only be extension'.
No it's normal because this file is not recognized as BMP file!
Closed XnView. Deleted INI, Started XnView.
Go to ANY directory with images. Files are coloured OK. Now switch file list to List. Go to another directory with images. Files are not coloured- BAD, they should.
Normal too, in list mode, i don't check file format.
Keep in mind, that i don't use extension for the color of items..
Pierre.

Xyzzy
Posts: 652
Joined: Tue Nov 23, 2004 10:17 pm
Location: Poland

Post by Xyzzy » Wed Dec 28, 2005 9:46 am

xnview wrote:
Xyzzy wrote: Files are not coloured at all- BAD, they should be coloured as BMP and JPEG file, according to 'Recognize only be extension'.
No it's normal because this file is not recognized as BMP file!
No, it's NOT normal. Option says Recognize only by extension. Extension is BMP. So file should be BMP from XnView's point of view. XnView can display error message on display, but coloring should be OK.
xnview wrote: Normal too, in list mode, i don't check file format.
Keep in mind, that i don't use extension for the color of items.
So what do you use for color of items if 'Recognize only by extension' is checked?????

I consider these are bugs, because program does not behave as its options suggest!


So, if we are at this subject, a few questions to you Pierre:
- What does file recognition feature do?
- What and where does 'Recognize only by extension' actually do?
- What and where does 'Scan file headers in folders' actually do?
- What are interactions of 'Recognize only by extension' and 'Scan file headers in folders'? Fe. if 'Scan file headers in folders' is 'Never', files seemingly should be recognized only by extension. So what 'Never' is for?
- What features disregard these options? So far I know one- file colouring. So how file colouring recognizes files?
- Are you sure the names of these options are OK?


X.

User avatar
xnview
Author of XnView
Posts: 33615
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Wed Dec 28, 2005 10:18 am

Xyzzy wrote:I consider these are bugs, because program does not behave as its options suggest!
No i don't think that it's bug, only my design
So, if we are at this subject, a few questions to you Pierre:
- What does file recognition feature do?
Read the header to check the format
- What and where does 'Recognize only by extension' actually do?
Used in thumbnail & detail mode, if a file has not the good extension, will be readed correctly
- What and where does 'Scan file headers in folders' actually do?
Used in list & column mode to read header of files
- What are interactions of 'Recognize only by extension' and 'Scan file headers in folders'? Fe. if 'Scan file headers in folders' is 'Never', files seemingly should be recognized only by extension. So what 'Never' is for?
Not used on the same mode
- What features disregard these options? So far I know one- file colouring. So how file colouring recognizes files?
File colouring is used when a file is recognized, not with his extension but the file header.
- Are you sure the names of these options are OK?
Yes :-)
Pierre.

Xyzzy
Posts: 652
Joined: Tue Nov 23, 2004 10:17 pm
Location: Poland

Post by Xyzzy » Wed Dec 28, 2005 10:34 am

Oh THANKS, so only 3 questions left:

- Thumbnail mode, bad file extension, Recognize only by extension checked. What happens?
- Thumbnail mode, Recognize only by extension is UNchecked. What else is used for determining file type?
- Thumbnail mode, Recognize by extension checked. Files are coloured. How it is possible? Headers are not scanned in this mode, so colouring should not work.

X.

User avatar
xnview
Author of XnView
Posts: 33615
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Wed Dec 28, 2005 10:44 am

Xyzzy wrote: - Thumbnail mode, bad file extension, Recognize only by extension checked. What happens?
The file is not recognize as picture (this is normal)
- Thumbnail mode, Recognize only by extension is UNchecked. What else is used for determining file type?
the header of file (i read the file)
- Thumbnail mode, Recognize by extension checked. Files are coloured. How it is possible? Headers are not scanned in this mode, so colouring should not work.
Headers are scanned because i extract/create the thumbnail
Pierre.

Xyzzy
Posts: 652
Joined: Tue Nov 23, 2004 10:17 pm
Location: Poland

Post by Xyzzy » Wed Dec 28, 2005 1:34 pm

Well, so in thumbnail mode files are effectively recognized always also by header, because you read headers when creating thumbnails?

In List and Icons mode, recognition using extension is NOT used at all, right?

X.

User avatar
xnview
Author of XnView
Posts: 33615
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Post by xnview » Wed Dec 28, 2005 2:49 pm

Xyzzy wrote:Well, so in thumbnail mode files are effectively recognized always also by header, because you read headers when creating thumbnails?
Yes
In List and Icons mode, recognition using extension is NOT used at all, right?
I use only extension (if enabled) too
Pierre.

Xyzzy
Posts: 652
Joined: Tue Nov 23, 2004 10:17 pm
Location: Poland

Post by Xyzzy » Wed Dec 28, 2005 3:18 pm

xnview wrote:
Xyzzy wrote:In List and Icons mode, recognition using extension is NOT used at all, right?
I use only extension (if enabled) too
I do not quite follow.
'Scan file headers in folders' is the only option for List and Icons.
If headers are to be scanned, file types are determined by header.
If not, file extension is used for the files that are not scanned?

X.

Locked