How to display an image within the figure in App Designer?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Salad Box
am 17 Nov. 2021
Kommentiert: Salad Box
am 18 Nov. 2021
Hi,
I used to work with GUI and I am very new to the 'App Designer'. As you can see here I have created an interface.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/804009/image.png)
I am hoping to click on the top button 'load your image', select an image in the file, then display it in the 'image' area. I don't know how to achieve this.
Please can anyone give me some advices? :)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/804014/image.png)
0 Kommentare
Akzeptierte Antwort
Yongjian Feng
am 17 Nov. 2021
Bearbeitet: Yongjian Feng
am 17 Nov. 2021
Try this in your callback:
[file, path] = uigetfile({'*.png'; '*.jpg'}, 'Select file');
app.Image.ImageSource = [path file];
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!