public class GrayFilter extends RGBImageFilter
canFilterIndexColorModel, newmodel, origmodel
consumer
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor and Description |
---|
GrayFilter(boolean b, int p)
构造一个将彩色图像过滤到灰度图像的GrayFilter对象。
|
Modifier and Type | Method and Description |
---|---|
static Image |
createDisabledImage(Image i)
创建禁用的图像
|
int |
filterRGB(int x, int y, int rgb)
覆盖
RGBImageFilter.filterRGB 。
|
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
public GrayFilter(boolean b, int p)
b
- 一个布尔值 - 如果像素应该变亮,则为真
p
- 一个在0..100范围内的int,它决定了灰色的百分比,其中100是最深的灰色,0是最亮的
public int filterRGB(int x, int y, int rgb)
RGBImageFilter.filterRGB
。
filterRGB
在
RGBImageFilter
x
- 像素的X坐标
y
- 像素的Y坐标
rgb
- 默认RGB颜色模型中的整数像素表示
ColorModel.getRGBdefault()
,
RGBImageFilter.filterRGBPixels(int, int, int, int, int[], int, int)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.