File Exchange

image thumbnail

Screen Capture

version (1.74 KB) by Chethan Pandarinath
Function to capture the screen, or portions of the screen. Uses java.awt.robot screen capture.


Updated 30 Apr 2012

View Version History

View License

Based on this excellent screencapture script by Saurabh Kumar:

Added a function wrapper to make it more convenient, also added options to be able to capture subregions instead of the full screen, and data can be returned as a Matlab image rather than just a file.

Jan Simon noted this implementation by Yair Altman which has many more options:

Cite As

Chethan Pandarinath (2021). Screen Capture (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (5)



Neha Jain

Thank You very much. This will certainly help me a great deal!.:)

Chethan Pandarinath

Thanks Jan. Actually I've uploaded a new version that does the conversion much faster (using reshape on the original matrix, as you suggest). Hopefully the system will update the file soon.


MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: screencapture

Community Treasure Hunt

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

Start Hunting!