No License

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

» Watch video

Highlights from

4.5 | 10 ratings Rate this file 16 Downloads (last 30 days) File Size: 301 Bytes File ID: #11363 Version: 1.0




11 Jun 2006 (Updated )

small utility to capture screen programatically

| Watch this File

File Information

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


This file inspired Screen Capture, Screen Record, Getscreen, and Screen Shot Rgb: Make A Screenshot Using Robot Java Class.

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
30 Jul 2014 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.

Comment only
14 Jun 2013 Bruno Dias

a good and useful script

26 Mar 2013 Oliver

Oliver (view profile)

12 May 2009 Roland

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?

Comment only
26 Apr 2009 Siamak Faridani

Siamak Faridani (view profile)

Great idea and nice implementation

24 Jul 2008 Eli Horn

Exactly what I needed.

04 May 2008 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.

Comment only
28 Feb 2008 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.

20 Feb 2008 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!

21 Dec 2007 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.

03 Oct 2007 Taner Eskil

Thanks Saurabh, you saved me a ton of time!

25 Feb 2007 Jo Bergs

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

14 Jun 2006 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.

Contact us