< prev index next >
src/java.desktop/share/classes/javax/swing/GrayFilter.java
Print this page
*** 74,84 ****
// filtering.
canFilterIndexColorModel = true;
}
/**
! * Overrides <code>RGBImageFilter.filterRGB</code>.
*/
public int filterRGB(int x, int y, int rgb) {
// Use NTSC conversion formula.
int gray = (int)((0.30 * ((rgb >> 16) & 0xff) +
0.59 * ((rgb >> 8) & 0xff) +
--- 74,84 ----
// filtering.
canFilterIndexColorModel = true;
}
/**
! * Overrides {@code RGBImageFilter.filterRGB}.
*/
public int filterRGB(int x, int y, int rgb) {
// Use NTSC conversion formula.
int gray = (int)((0.30 * ((rgb >> 16) & 0xff) +
0.59 * ((rgb >> 8) & 0xff) +
< prev index next >