grabber.grabPixels();
pixelMap = (int[])grabber.getPixels();
findBounds(w,h);
// now downsample
Grid data = gridPanel.getData();
ratioX = (double)(downSampleRight-
downSampleLeft)/(double)data.getWidth();
ratioY = (double)(downSampleBottom-
downSampleTop)/(double)data.getHeight();
for ( int y=0;y<data.getHeight();y++ ) {
for ( int x=0;x<data.getWidth();x++ ) {
if ( downSampleQuadrant(x,y) )
data.enableBlock(x,y);
else
data.disableBlock(x,y);
}
}
gridPanel.repaint();
repaint();