Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BufferedImage result = new BufferedImage( img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_RGB
- );
- int rows = 2;
- int cols = 2;
- int chunks = rows*cols;
- BufferedImage array[][] = new BufferedImage[rows][cols];
- for (int x =0; x <rows; x++){
- for(int y = 0; y<cols; y++){
- for(int i=0; i<img.getWidth();i++){
- for(int j=0; j<img.getHeight();j++){
- array[x][y]=new BufferedImage(img.getWidth(), img.getHeight(), img.getRGB(i,j));
- result = array[x][y];
- }
- }
- }
- }
- return result;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement