Advertisement
Guest User

Untitled

a guest
Nov 29th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. BufferedImage result = new BufferedImage( img.getWidth(), img.getHeight(), BufferedImage.TYPE_INT_RGB
  2. );
  3. int rows = 2;
  4. int cols = 2;
  5. int chunks = rows*cols;
  6.  
  7. BufferedImage array[][] = new BufferedImage[rows][cols];
  8. for (int x =0; x <rows; x++){
  9. for(int y = 0; y<cols; y++){
  10. for(int i=0; i<img.getWidth();i++){
  11. for(int j=0; j<img.getHeight();j++){
  12. array[x][y]=new BufferedImage(img.getWidth(), img.getHeight(), img.getRGB(i,j));
  13. result = array[x][y];
  14. }
  15. }
  16. }
  17.  
  18. }
  19. return result;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement