Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int k = 0;
- int kRoll = 0;
- int width = img.getWidth();
- int height = img.getHeight();
- for (int i = 0; i < SIZE; i++) {
- for (int j = 0; j < SIZE; j++) {
- imgArray[k] = Bitmap.createBitmap(img, (width * j) / SIZE,
- (i * height) / SIZE, width / SIZE, height / SIZE);
- if (k == 0) {
- k = kRoll;
- }
- imgMap.put(k, imgArray[k]);
- k++;
- kRoll = k;
- }
- }
Add Comment
Please, Sign In to add comment