I am trying to convert a MATLAB App Designer App to a Web App. After viewing this page on the limitations of a MATLAB Web App, I do not see any incompatibilites. However, I am having a problem with loading images with 'uigetfile' and being able to read them with 'imread'. To investigate this, I created a really simple test app. There is a push button and a UIAxes, and the push button allows the user to upload an image that will be displayed in the UI Axes. Here is the code for said push button.
But when I upload a test .tif image, I consistently get this error.
When I navigate to the temporary folder where 'uigetfile' stores the image, I can not open them in any image viewing app. They seem to get corrupted in the process. I can not share the image because it is from a lab and I do not want to get in trouble, but I can guarantee that the image is not corrupted and the process works in an offline setting with the exact same image file. Am I missing something very obvious?
Thank you in advance to anyone who lends their help.
"If my goal is to have the user be able to upload one or more image(s) for analysis, is there a correct way to do this?" <== Waht I would do is to have your app load a listbox full of images they can select from so they can just easily click one or more to analyze, and then click the Analyze or Go button to do the batch processing. I'd also have a button that calls uigetdir() so the user can specify what folder's files get loaded into the listbox.