4.375

4.4 | 8 ratings Rate this file 33 Downloads (last 30 days) File Size: 301 Bytes File ID: #11363

screencapture

by saurabh kumar

 

11 Jun 2006 (Updated 12 Jun 2006)

small utility to capture screen programatically

| Watch this File

File Information
Description

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

Acknowledgements
This submission has inspired the following:
screen record, getscreen, screenShotRGB: Make a Screenshot using Robot Java Class
MATLAB release MATLAB 7 (R14)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (10)
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.

25 Feb 2007 Jo Bergs

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

03 Oct 2007 Taner Eskil

Thanks Saurabh, you saved me a ton of time!

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.

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!

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.

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.

24 Jul 2008 Eli Horn

Exactly what I needed.
Thanks!

26 Apr 2009 Siamak Faridani

Great idea and nice implementation

12 May 2009 Roland

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?

Please login to add a comment or rating.

Contact us at files@mathworks.com