I found out is a huge problem in LazPaint. When an indexed image is open (let's say 1bpp, or strictly black and white it is automatically converted to RGB). And after saving it takes significantly more disk space.
If LazPaint cannot work in other mode than RGB, I suppose that a warning message should be shown, when a non RGB image is open.
No, I am talking about computing the index of the extensions by going through the filter string (the Filter property of the TOpenDialog/TSaveDialog). This way we can be sure that the index correspond to the extension. The Filter property need to contain the extension and moreover, the list may be different depending on the dialog box.
I'll take care for that.
Well, I have already written this fuction in the imagelist form, it just needs to be moved to a more global unit. It has a shortcomming, that it does not ignore noncaseble chars (numbers, punctations, etc) which I will fix one day but that is not a bug indeed.
Yes.
an extension like "bMp" or "bMP" could safely be ignored)
I seen no benefit from ignoring them.
Yeah, I don't know if there could be a slow down let's say if we have a directory of thousands of files and each extension having 16 masks (*.abc; *.Abc, etc.). I reckon the beauty of generating all possible cases, but I am not sure it is reasonable. I propose you to go on with the code you wrote, and test it on Linux. I can test it on Puppy Linux and on Linux Mint. For Windows, this is better not to do it because it is not case sensitive. We can do that with a {$IFNDEF WINDOWS}
I will test in on XUBUNTU. Indeed, it should better be skipped in Windows. Actually I was wondering if handling non-caseble extensions would require less or more resources. So you'd better wait until I add this fucntionality before starting tests. Maybe we could ask other people to test in the Linux section. It's a general issue.
EDIT: Actually it is the file system that is case sensitive, not the OS. A FAT32 system mounted on should be case insensitive, which is quite common (USB devices, etc). Respectively an EXT2 FS, mounted on Windows will be case sensitive, which is quite a rare cse, IMHO, so indeed disabling AllExtension on Windows won't cause many problems. Anyway, it's worth testing. If no significant delay occurs, it could stay.
The best solution would be to act according the FAT, but AFAIK a standard dialog won't do that so the world will have to do without it