imagepy icon indicating copy to clipboard operation
imagepy copied to clipboard

Support case insensitive image extensions

Open CsatiZoltan opened this issue 5 years ago • 2 comments

I realized that I couldn't find an image file with .PNG extension. It is because ImagePy only loads .png (i.e. with lower case). You could consider accepting upper case extensions too.

CsatiZoltan avatar Feb 18 '20 15:02 CsatiZoltan

I had tested it in deepin linux, and I both png and PNG is OK, what's your os?

yxdragon avatar Feb 21 '20 02:02 yxdragon

If I use File -> Open, then only the images with lowercase extensions are listed. You can check it by investigating the fifth element of the list ls here: https://github.com/Image-Py/imagepy/blob/9710a277ad5711ca91c19c9324cb1bc18f4e2ff6/imagepy/core/manager/iomanager.py#L16 To me, it shows

dict_keys(['jpg', 'jpeg', 'dat', 'dcm', 'npy', 'tif', 'tiff', 'mat', 'png', 'gif', 'bmp'])

On the other hand, File -> PNG -> PNG Open gives 'PNG files (*.PNG)|*.PNG' in the filt variable: https://github.com/Image-Py/imagepy/blob/9710a277ad5711ca91c19c9324cb1bc18f4e2ff6/imagepy/core/util/fileio.py#L47 resulting in (see the red highlighting): Extension I don't think it matters, but I work on Ubuntu 18.04 with Gnome 3 desktop.

CsatiZoltan avatar Feb 21 '20 08:02 CsatiZoltan