# saving screen as jpeg

**URL:** <https://psychtoolbox.discourse.group/t/saving-screen-as-jpeg/839>\
**Category:** Uncategorized\
**Created:** [December 2, 2008, 8:54pm UTC](https://psychtoolbox.discourse.group/t/saving-screen-as-jpeg/839 "2008-12-02T20:54:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [December 2, 2008, 8:54pm UTC](https://psychtoolbox.discourse.group/t/saving-screen-as-jpeg/839/1 "2008-12-02T20:54:06Z")

</div>

Hi,  
  
Does anyone know how I can capture the screen image and save it as a  
jpeg? I have a code that generates videos using the toolbox but I  
would like to save each presented frame as a jpg or bitmap image.  
  
Thanks,  
  
Aaron

---

<div class="post-metadata">

**Author:** ![ah\_javadi](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@ah\_javadi](https://psychtoolbox.discourse.group/u/ah_javadi)\
**Post date:** [December 4, 2008, 8:41am UTC](https://psychtoolbox.discourse.group/t/saving-screen-as-jpeg/839/2 "2008-12-04T08:41:07Z")

</div>

Hello,  
Dear Aaron  
  
You can use the following psychtoolbox function to capture the screen  
  
imageArray=Screen('GetImage', windowPtr [,rect] [,bufferName] [,floatprecision=0] [,nrchannels=3])  
  
and then, you can use MATLAB function "imwrite" to save your image, imageArray.  
  
Have a good time,  
Amir  
  
  
  

2008/12/2 aronkra \<[aronkra@...](mailto:aronkra@...)\>  

> > Hi,  
> >   
> > Does anyone know how I can capture the screen image and save it as a  
> > jpeg? I have a code that generates videos using the toolbox but I  
> > would like to save each presented frame as a jpg or bitmap image.  
> >   
> > Thanks,  
> >   
> > Aaron

---

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [December 11, 2008, 7:55pm UTC](https://psychtoolbox.discourse.group/t/saving-screen-as-jpeg/839/3 "2008-12-11T19:55:59Z")

</div>

Thanks. I'll try that.
