I am doing a photometry type of thing with greenfoot; to start with- I have to make greenfoot able to do a rectangular selection on an image and calculation of color RGB average inside that rectangle. Any ideas for either of functions?
For every point within the rectangle you should use the GreenfootImage class method that returns the color at a specified location within the image and the rest can be done with methods of the Color class and Maths.
Thank you guys and yes I should have explained. Rectangular selection- to mark a rectangle like in paint and work only on that area. Under RGB average I mean three separate values of pixels of colors R G and B divided by total number of pixels in a selected area.