ImageConsumer
, Cloneable
public class GrayFilter extends RGBImageFilter
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
consumer
canFilterIndexColorModel, newmodel, origmodel
Constructor | Description |
---|---|
GrayFilter(boolean b,
int p) |
Constructs a GrayFilter object that filters a color image to a
grayscale image.
|
Modifier and Type | Method | Description |
---|---|---|
static Image |
createDisabledImage(Image i) |
Creates a disabled image
|
int |
filterRGB(int x,
int y,
int rgb) |
Overrides
RGBImageFilter.filterRGB . |
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
public GrayFilter(boolean b, int p)
b
- a boolean -- true if the pixels should be brightenedp
- an int in the range 0..100 that determines the percentage
of gray, where 100 is the darkest gray, and 0 is the lightestpublic static Image createDisabledImage(Image i)
i
- an Image
to be created as disabledi
public int filterRGB(int x, int y, int rgb)
RGBImageFilter.filterRGB
.filterRGB
in class RGBImageFilter
x
- the X coordinate of the pixely
- the Y coordinate of the pixelrgb
- the integer pixel representation in the default RGB
color modelColorModel.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, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps