Screenshot of specific window (not full screen)
12 ビュー (過去 30 日間)
古いコメントを表示
Hello,
is it possible to take a screenshot (I used Java commands) of only a specific Window (not the entire screen) ? - for instance, from the full screen below I only want to take a screenshot from the pop-up screen (GUI window)
To take a screenshot from the full window I used the following commands:
robo = java.awt.Robot;
t = java.awt.Toolkit.getDefaultToolkit();
rectangle = java.awt.Rectangle(t.getScreenSize());
image = robo.createScreenCapture(rectangle);
Thanks
0 件のコメント
採用された回答
Image Analyst
2022 年 9 月 17 日
編集済み: Image Analyst
2022 年 9 月 17 日
fileName = fullfile(pwd, 'Screenshot.png')
exportgraphics(gcf, fileName); % Save current figure window.
% or
exportgraphics(gca, fileName); % Save last axes you plotted in.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Printing and Saving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!