# Stimulus presentation using CopyWindow

**URL:** <https://psychtoolbox.discourse.group/t/stimulus-presentation-using-copywindow/1289>\
**Category:** Uncategorized\
**Created:** [January 10, 2003, 10:09pm UTC](https://psychtoolbox.discourse.group/t/stimulus-presentation-using-copywindow/1289 "2003-01-10T22:09:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rappley123](https://avatars.discourse-cdn.com/v4/letter/r/ecc23a/32.png) [@rappley123](https://psychtoolbox.discourse.group/u/rappley123)\
**Post date:** [January 10, 2003, 10:09pm UTC](https://psychtoolbox.discourse.group/t/stimulus-presentation-using-copywindow/1289/1 "2003-01-10T22:09:35Z")

</div>

Hi,  
  
I've created a script to present B&W photographs. First I use imread   
to get the picture (TIFF), then I used centerrrect and/or offsetrect   
to place it where I want it on the screen. For each picture I open   
an offscreen window and use PutImage to put the picture into the   
offscreen window. All of this happens in the initialization phase so   
at presentation I just have to copy the windows to my current   
display. All of my pictures are B&W and all are 280w X 339h (pixel   
size). For some reason, though, they're coming up square at   
presentation! Somewhere along the line they're being cropped. I do   
define a rectangle for each picture:  
pic\_rect = [0,0,size(pic)];  
  
As far as I can tell that rectangle is the correct size for the   
picture. Do you have any ideas for how to display the full picture?  
  
Thanks,  
Irit Rappley

---

<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:** [January 11, 2003, 2:26am UTC](https://psychtoolbox.discourse.group/t/stimulus-presentation-using-copywindow/1289/2 "2003-01-11T02:26:41Z")

</div>

Without seeing your program, it is impossible to tell what is going   
wrong. Are the offscreen windows the same size as your pictures? It   
sounds like somewhere you are not specifying the correct rect (either in   
PutImage or CopyWindow).  
  
keith  
  

> On Fri, 10 Jan 2003, rappley123 \<[rappley123@...](mailto:rappley123@...)\> wrote:  
>    
> \> Hi,  
> \>   
> \> I've created a script to present B&W photographs. First I use imread   
> \> to get the picture (TIFF), then I used centerrrect and/or offsetrect   
> \> to place it where I want it on the screen. For each picture I open   
> \> an offscreen window and use PutImage to put the picture into the   
> \> offscreen window. All of this happens in the initialization phase so   
> \> at presentation I just have to copy the windows to my current   
> \> display. All of my pictures are B&W and all are 280w X 339h (pixel   
> \> size). For some reason, though, they're coming up square at   
> \> presentation! Somewhere along the line they're being cropped. I do   
> \> define a rectangle for each picture:  
> \> pic\_rect = [0,0,size(pic)];  
> \>   
> \> As far as I can tell that rectangle is the correct size for the   
> \> picture. Do you have any ideas for how to display the full picture?  
> \>   
> \> Thanks,  
> \> Irit Rappley  
> \>   
> \>   
> \>   
> \> [http://psychtoolbox.org](http://psychtoolbox.org)  
> \> POST a message to: [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com)  
> \> UNSUBSCRIBE by sending a blank message to:   
> \> [psychtoolbox-unsubscribe@yahoogroups.com](mailto:psychtoolbox-unsubscribe@yahoogroups.com)   
> \>   
> \> Your use of Yahoo! Groups is subject to [http://docs.yahoo.com/info/terms/](http://docs.yahoo.com/info/terms/)   
> \>   
> \>
