Effacer les filtres
Effacer les filtres

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

2 vues (au cours des 30 derniers jours)
Haider Ali
Haider Ali le 27 Oct 2018
Modifié(e) : Haider Ali le 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

Réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by