print('-RGBImage', '-r0') for invisible figure

2 次查看(过去 30 天)
Hi,
I need to get the cdata of a .fig file using print('-RGBImage', '-r0') which is opened using openfig(_,'invisible') command. The problem is that the figure is not opened maximized and thus the print('-RGBImage', '-r0') command does not output image at screen resolution but at a lower one. But when I use openfig(_) with 'visible' option and then maximize the 'WindowState' of that figure, then print('-RGBImage', '-r0') outputs the data at my desired screens resolution.
The code for these two cases is given below:
First case: 'invisible'
f = openfig('test', 'visible');
f.WindowState = 'maximized';
im1 = print('-RGBImage', '-r0');
The im1 dimensions are 420x560x3 (not desired)
Second case: 'visible'
f = openfig('test', 'visible'); f.WindowState = 'maximized'; im2 = print('-RGBImage', '-r0');
The im2 dimensions are 783x1600x3 (desired)
My question is: how can I get the full screen resolution image while opening the figure using 'invisible' option?
Regards

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by