How to display an image within the figure in App Designer?

8 vues (au cours des 30 derniers jours)
Salad Box
Salad Box le 17 Nov 2021
Commenté : Salad Box le 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.
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? :)

Réponse acceptée

Yongjian Feng
Yongjian Feng le 17 Nov 2021
Modifié(e) : Yongjian Feng le 17 Nov 2021
Try this in your callback:
[file, path] = uigetfile({'*.png'; '*.jpg'}, 'Select file');
app.Image.ImageSource = [path file];
  1 commentaire
Salad Box
Salad Box le 18 Nov 2021
That is super helpful and works perfectly! Thank you so much!!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by