File Exchange

image thumbnail


version 1.0 (301 Bytes) by

small utility to capture screen programatically

1 Download


No License

if you ever need a screenshot inside a is a small script for you.

Comments and Ratings (13)

Willy Steve

i construct a gui with the name Hiwi_arbeit where i will plot figure and having values for calculated parameter. i really want to get screenshot of this Hiwi_arbeit fig i try many thing but he doesn work and the screencapture code is not in matlab library. could any one help me please.

Bruno Dias

a good and useful script


Oliver (view profile)


Roland (view profile)

Thanks so much for this!

I was not able to use getframe, since i need to take a screenshot of parts that doesnt belong to Matlab.

On my computer it takes about 0.6 seconds to make a screenshot. is there any way to make that faster?
i guess it is the java loading time, that makes it slow, anyone knows a way how to "quickstart" java?

Siamak Faridani

Great idea and nice implementation

Eli Horn

Exactly what I needed.

Robert Brookhuis

@Richard Chao
I used getframe before but sometimes the result was messed up for unknown reason. The method presented here doesn't have this problem.

Richard Chao

Yes, it's my want exactly.Thank you Saurabh.
I still think why root remove the captureRect/Matrix and change to getframe instead of, and getframe cann't snapshot the root screen (windows/Mas).

btw, Dear Robert Brookhuis, you can use getframe to capture your GUI easily.

Robert Brookhuis

That's exactly what I needed!

I changed the code to capture my GUI only by replacing the "t.getScreenSize()" by the "position" property of my GUI (with some modifications). Works fine!

Tom Clark

Thanks, exactly what I needed.

If I recommended an improvement, I'd say that it'd be nice to be able to specify e.g. tiff, gif, bmp output too.

Taner Eskil

Thanks Saurabh, you saved me a ton of time!

Jo Bergs

Thanks, that's what i needed!
Java + Matlab = Awesome

Aldo Caraceto

Really nice idea!
It already gets the goal even if it could be improved further on giving the user the chance to define a limited region of the active window instead of the whole window to export.

MATLAB Release
MATLAB 7 (R14)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today