📄 filter.java
字号:
package imageFilter;
public interface Filter {
public static final int RED = 0, GREEN = 1, BLUE = 2 ;
/** Return an array representing an image.
* Images are represented as follows:
* <ul><li>The first dimension is horrizontal from left to right</li>
* <li>The second dimension is vertical from top to bottom</li>
* <li>The third dimension is colour in order: index 0 gives the red channel,
* index 1 the green and index 2 the blue</li>
* <li>Each colour is represented by an integer between 0 and 255 inclusive
* with 0 being darker and 255 being lightest</li>
* </ul>
* <p><b>Precondition:</b><ul>
* <li> raster.length == width </li>
* <li> for all i. raster[i].length = height </li>
* <li> for all i, j. raster[i][j].length == 3 </li>
* <li> for all i, j, k. 0 <= raster[i][j][k] && raster[i][j][k] < 256 </li>
* <li> It can be assumed that the raster array and its items are never changed,
* thus pixel arrays from the input may be reused in the output.
* </ul>
* </p>
* <p><b>Postcondition:</b><ul>
* <li> raster is unchanged </li>
* <li> for all i0, i1. result[i0].length == result[i1].length </li>
* <li> for all i, j. result[i][j].length == 3 </li>
* <li> for all i, j, k. 0 <= result[i][j][k] && result[i][j][k] < 256 </li>
* </ul>
* </p>
* @param width The width of the input image
* @param height The height of the input image
* @param raster The input image
*/
public short[][][] process( int width, int height, short[][][] raster ) ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -