Print an image in Matlab GUI
이전 댓글 표시
How do you print an image from a printer in Matlab GUI? I get an error using the code below. Please help me.
Undefined function or variable 'smapleimage'.
smapleimage = imread('image.png');
printdlg(handles.smapleimage)
답변 (1개)
Arthur
2012년 11월 17일
I guess it should be
smapleimage = imread('image.png');
printdlg(smapleimage)
댓글 수: 6
Eric Letsolo
2012년 11월 17일
Arthur
2012년 11월 17일
This error does not come from the two lines you showed here. Please show the entire error message, and the code where it came from.
Eric Letsolo
2012년 11월 17일
편집: Image Analyst
2012년 11월 18일
Arthur
2012년 11월 17일
Ok, printdlg only accepts figure windows. Try this:
hFig = figure();
smapleimage = imread('image.png');
imshow(smapleimage)
printdlg(hFig)
Eric Letsolo
2012년 11월 17일
Arthur
2012년 11월 18일
카테고리
도움말 센터 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!