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!