필터 지우기
필터 지우기

App Designer won't display static image

조회 수: 9 (최근 30일)
Daemonic
Daemonic 2020년 2월 15일
답변: Daemonic 2020년 2월 24일
I'm trying out App Designer in ver. 2019a and attmepting to display a static image.
  1. From Designer View I select "Image" from the Component Library
  2. For Image in the Component Browser, I selected browse and found a .jpg image in the current directory (i.e., same directory in which the app is saved.
  3. When I save and run the app, I get the following stack of errors in the Command Window.
Warning: Error occurred when parsing the ImageSource value.
> In matlab.ui.control.internal.controller.ImageController/getImagePropertiesForView (line 189)
In matlab.ui.control.internal.controller.ImageController/getPropertiesForView (line 55)
In appdesservices.internal.interfaces.controller.mixin.ViewPropertiesHandler/getPVPairsForView (line 248)
In appdesservices.internal.interfaces.controller.AbstractController/populateView (line 152)
In matlab.ui.control.internal.controller.ComponentControllerFactory/createController (line 172)
In matlab.ui.control.internal.model.ComponentModel/createController (line 68)
In matlab.ui.internal.componentframework.WebControllerFactory/create (line 94)
In appdesigner.internal.application.figure.DesktopFigureService/captureScreenshot (line 19)
In appdesigner.internal.model.AppModel.runAppHelper (line 688)
In appdesigner.internal.model.AppModel>@()appdesigner.internal.model.AppModel.runAppHelper(obj,appArguments) (line 509)
>>
Here is the code in Code View:
% Create Image
app.Image = uiimage(app.UIFigure);
app.Image.Position = [432 314 100 100];
app.Image.ImageSource = 'IMG_0565.jpg';
% Show the figure after all components are created
app.UIFigure.Visible = 'on';

채택된 답변

Daemonic
Daemonic 2020년 2월 24일
Apparently, I had something had gone awry on my previous installation. After reinstalling Matlab + associated toolboxes, this issue is now resolved.

추가 답변 (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