필터 지우기
필터 지우기

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

조회 수: 4 (최근 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 CenterFile Exchange에서 Develop 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