主题:求助关于gui显示图片的问题?能解释一下这段代码的意思么?谢谢
set(hObject, 'Units', 'pixels');
handles.banner = imread([matlabroot filesep 'demos' filesep
'banner.jpg']); % Read the image file banner.jpg
info = imfinfo([matlabroot filesep 'demos' filesep
'banner.jpg']); % Determine the size of the image file
position = get(hObject, 'Position');
set(hObject, 'Position', [position(1:2) info.Width + 100
info.Height + 100]);
axes(handles.axes1);
image(handles.banner)
set(handles.axes1, ...
'Visible', 'off', ...
'Units', 'pixels', ...
'Position', [50 50 info.Width info.Height]);
能不能给一个真实的例子参考一下,谢谢
handles.banner = imread([matlabroot filesep 'demos' filesep
'banner.jpg']); % Read the image file banner.jpg
info = imfinfo([matlabroot filesep 'demos' filesep
'banner.jpg']); % Determine the size of the image file
position = get(hObject, 'Position');
set(hObject, 'Position', [position(1:2) info.Width + 100
info.Height + 100]);
axes(handles.axes1);
image(handles.banner)
set(handles.axes1, ...
'Visible', 'off', ...
'Units', 'pixels', ...
'Position', [50 50 info.Width info.Height]);
能不能给一个真实的例子参考一下,谢谢