return image;
}
+ @Override
public int getHeight() {
return height;
}
+ @Override
public int getWidth() {
return width;
}
*
* where R, G, and B are values in [0,1].
*/
+ @Override
protected int getLuminance(int x, int y) {
int pixel = image.getRGB(left + x, top + y);
// Coefficients add up to 1024 to make the divide into a fast shift
117 * (pixel & 0xFF)) >> 10;
}
+ @Override
protected int[] getLuminanceRow(int y, int[] row) {
if (row == null || row.length < width) {
row = new int[width];
return row;
}
+ @Override
protected int[] getLuminanceColumn(int x, int[] column) {
if (column == null || column.length < height) {
column = new int[height];