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

2 views (last 30 days)
Haider Ali
Haider Ali on 27 Oct 2018
Edited: Haider Ali on 27 Oct 2018
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

Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!