MATLAB: Imgetfile unable to click on .JPG files, but works fine with .jpg

.jpgimage processingimgetfile

Hi there!
I'm working on a GUI that asks the user to upload multiple images and am therefore using imgetfile().
Lately, I've been having the problem that when the images have a capitalized extension – .JPG, the files become grayed out in the upload window and I am unable to select them, as if Matlab does not believe these to be image files.
Is there a setting I can change somewhere that will allow .JPG files to be treated the same as .jpg?

Best Answer

MS Windows NTFS file systems are almost always set to be case insensitive, and OS-X / MacOS filesystems are usually set to be case insensitive, so this is not typically a problem on those systems. However, it does tend to be a problem on Linux systems, and there is that portion of OS-X users with case-sensitivity turned on.
Unfortunately, imgetfile() does not provide any explicit means to override this.
imgetfile() does, however, specifically add a '*.*' filter option in what it sends to uigetfile(). uigetfile eventually delegates to the operating system native file chooser. Somewhere on the window there should be something you can select to change the active filter. On OS-X for example it would be button marked 'Options' to the far left on the same line as the 'Cancel'.
Possibly you might need to shift-click or something similar -- though those kinds of modifiers would more typically be used for multiselect.
Related Question