MultiDimArr - Java (Package Sidewinderutils
MultiDimArr - Java (Package Sidewinderutils
MultiDimArr - Java (Package Sidewinderutils
import java.awt.image.WritableRaster;
// Tue, Nov 30, 2010 at 2:00 PM MultiDimArr.java Written by Mr. Samuel A Marchant nicephotog-
jsp.net [email protected]
// "C:\Program Files\Java\jdk1.6.0_22\bin\javac.exe" MultiDimArr.java
public class MultiDimArr{
public void debugPrint(){
System.out.println("TRIGGERED PRINTER IN CLASS MultiDimArr.java");
}
int fzst=0;
int vto=0;
while(fzst<httimg){
vto=0;
while(vto<lenbrdthimg){
//System.out.println("hty-height: "+fzst);
//System.out.println("cwid-width: "+vto);
//pxlarr = wras.getPixel(hty,cwid,pxlarr);
pxlarr = wras.getPixel(vto,fzst,pxlarr); // !!! array is [H][W](y,x) getPixel is W,H(x,y)
Overstep[fzst][vto]=(new Integer(pxlarr[rgb]).shortValue());
//System.out.println("Overstep[][]: "+Overstep[fzst][vto]);
vto++;
}//enwhl
fzst++;
}//enwhl
return ((short[][])Overstep);
}//enmeth
short[][] nwArr;
nwArr = new short[nwHeight][];
//
for(int bhty=0;(bhty<nwHeight);bhty++){
nwArr[bhty] = new short[nwWidth];
}//enwhl
// start loading
int iterNwBand = 0;
int ydwn = ydownStrt;
//xaccrStrt-=1;
//System.out.println("at start ydwn:"+ydwn);
//System.out.println("at start xaccrStrt:"+xaccrStrt);
while(iterNwBand<nwHeight){ // counts the band lines
int xacr = xaccrStrt;
for(int asc=0;asc<nwWidth;asc++){
nwArr[iterNwBand][asc] = oldArr[ydwn][xacr];
xacr++;
}//enfr
ydwn++;
iterNwBand++;
}//enwhl
//System.out.println("iterNwBand:"+iterNwBand+" ydwn:"+ydwn);
return ((short[][])nwArr);
}//enmeth
}//enclss