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

2 ビュー (過去 30 日間)
Salad Box
Salad Box 2021 年 11 月 17 日
コメント済み: Salad Box 2021 年 11 月 18 日
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? :)

採用された回答

Yongjian Feng
Yongjian Feng 2021 年 11 月 17 日
編集済み: Yongjian Feng 2021 年 11 月 17 日
Try this in your callback:
[file, path] = uigetfile({'*.png'; '*.jpg'}, 'Select file');
app.Image.ImageSource = [path file];
  1 件のコメント
Salad Box
Salad Box 2021 年 11 月 18 日
That is super helpful and works perfectly! Thank you so much!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by