package imageprocessing; /** * @author Lincoln Ritter * This interface needs to be implemented by Image. */ public interface IImage { /** * * @return The width (number of columns) of the image */ public int getWidth(); /** * * @return THe height (number of rows) of the image */ public int getHeight(); /** * * @param r The row of the pixel being set * @param c The column of the pixel being set * @param pixel an array of values to be set at location (r,c) ([R G B] ordering) * @throws IndexOutOfBoundsException thrown if the given row or column is out of bounds * @throws IllegalArgumentException thrown if the length of the values parameter is inappropriate for the image. */ public void setPixel(int r, int c, int[] values) throws IndexOutOfBoundsException, IllegalArgumentException; /** * * @param r The row of the pixel being set * @param c The column of the pixel being set * @return and array of values at the given row and column ([R G B] ordering). * @throws IndexOutOfBoundsException thrown if the given row or column is out of bounds */ public int[] getPixel(int r, int c) throws IndexOutOfBoundsException; }