Effacer les filtres
Effacer les filtres

imwrite on remote desktop

4 vues (au cours des 30 derniers jours)
dan
dan le 24 Mar 2021
Commenté : dan le 25 Mar 2021
Hi,
I'm using imwrite to save images on a machine that I'm accessing via remote desktop. This works as expected when the remote desktop screen is maximised. However, if I minimise or close the remote desktop to get on with something else while it's processing, I just end up with blank images.
This is the code I'm using:
def_back = get(gcf,'Color');
set(gcf,'Color',[1 1 1]);
drawnow
frame = getframe(gcf);
image = (frame2im(frame));
imwrite(image,[<FILENAME> '.png'])
set(gcf,'Color',def_back);
drawnow

Réponse acceptée

Jan
Jan le 24 Mar 2021
Modifié(e) : Jan le 24 Mar 2021
The observation is correct. getframe does not work outside the visible area of the screen. So this is not a problem of imwrite. Try to replace getframe by:
cdata = print(gcf, '-RGBImage')
  1 commentaire
dan
dan le 25 Mar 2021
Thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Produits


Version

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by