# Window larger than screen: how to see all parts?

**URL:** <https://discourse.processing.org/t/window-larger-than-screen-how-to-see-all-parts/17074>\
**Category:** Processing\
**Created:** [January 14, 2020, 2:30am UTC](https://discourse.processing.org/t/window-larger-than-screen-how-to-see-all-parts/17074 "2020-01-14T02:30:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mortap](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@mortap](https://discourse.processing.org/u/mortap)\
**Post date:** [January 14, 2020, 2:30am UTC](https://discourse.processing.org/t/window-larger-than-screen-how-to-see-all-parts/17074/1 "2020-01-14T02:30:51Z")

</div>

Sometimes I use processing with larger photos (e.g. size(15000, 4000);).

It would be great if I could scroll around (or even zoom in and out) to see if all the parts of the photo are ready before saving the image, but right now the best I can do is slide the window from left to right and only see the uppermost part. Is there anyway around this?

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [January 14, 2020, 4:04am UTC](https://discourse.processing.org/t/window-larger-than-screen-how-to-see-all-parts/17074/2 "2020-01-14T04:04:30Z")

</div>

did you play with the image function copy and resize?  
small test:

```auto
/**
 * Load and Display 
 * 
 * Images can be loaded and displayed to the screen at their actual size
 * or any other size. 
 */
 
// test move zoom 

// ______________________________________ VARIABLES
PImage img0,img; // _____________________ Declare variables of type PImage
String infile = "data/moonwalk.jpg"; //_ source file
float w,h,zoom=0.50;
float px,py; // _________________________ center position

void setup() { // _______________________ SETUP
  size(640, 360);
  img0 = loadImage(infile); // __________ Load the image into the program  
  w = img0.width; // ____________________ get its original size
  h = img0.height;
  px = w/2; // __________________________ default center position
  py = h/2;
  println("use: mouse for move and mouswheel for zoom");
}

void select() { // ______________________ IMAGE MOD FUNCTION
  mousemove(); // _______________________ look for mouse position
  img = img0.copy(); // _________________ make a copy
  img.copy(int(px-w/2),int(py-h/2),int(w),int(h),0,0, int(w),int(h)); //_ select what we need
  img.resize(int(w*zoom),int(h*zoom)); //_ and zoom it
}

void draw() { // ________________________ DRAW
  background(200,200,0); 
  select(); // __________________________ get it
  image(img, 0, 0); // __________________ show it
}

void mousemove() { // ___________________ mouse click CENTER
  px = mouseX*zoom; // __________________ not optimal math
  py = mouseY*zoom;
  println("center at "+px+" , "+py);
}

void mouseWheel(MouseEvent event) { //__ mouse scroll ZOOM
  float e = event.getCount();
  //if ( keyPressed && key == 'z' ) //_ optional MWPP  
  zoom += e*0.03; // ____________________ play with zoom step size here
}

```

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [January 14, 2020, 4:29am UTC](https://discourse.processing.org/t/window-larger-than-screen-how-to-see-all-parts/17074/3 "2020-01-14T04:29:45Z")

</div>

What you need is call panning. Previous posts:

- [https://forum.processing.org/two/discussion/1364/constraining-an-image-while-panning-and-zooming](https://forum.processing.org/two/discussion/1364/constraining-an-image-while-panning-and-zooming)
- [How to make a 2d Zoom and Pan](https://discourse.processing.org/t/how-to-make-a-2d-zoom-and-pan/1179/10)

Kf
