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?
did you play with the image function copy and resize?
small test:
/**
* 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
}