Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int red = new long[256];
- int blue = new long[256];
- int green = new long[256];
- for (int y = 0; y < image.getImage().getHeight(); y++) {
- for (int x = 0; x < image.getImage().getWidth(); x++) {
- int redCount = (int)(pr.getColor(x, y).getRed()*255);
- int blueCount = (int)(pr.getColor(x, y).getBlue()*255);
- int greenCount = (int)(pr.getColor(x, y).getGreen()*255);
- int averageCount = ((int)(pr.getColor(x, y).getGreen()*255) +
- (int)(pr.getColor(x, y).getRed()*255) +
- (int)(pr.getColor(x, y).getBlue()*255))/3;
- red[redCount]++;
- blue[blueCount]++;
- green[greenCount]++;
- rgb3[averageCount]++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement