|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.coobird.thumbnailator.filters.Colorize
public final class Colorize
An image filter which will add a color tint to an image.
Constructor Summary | |
---|---|
Colorize(Color c)
Instantiates this filter with the color to use to tint the target image with. |
|
Colorize(Color c,
float alpha)
Instantiates this filter with the color to use to tint the target image with and the transparency level provided as a float ranging from
0.0f to 1.0f , where 0.0f indicates completely
transparent, and 1.0f indicates completely opaque. |
|
Colorize(Color c,
int alpha)
Instantiates this filter with the color to use to tint the target image with and the transparency level provided as a int ranging from
0 to 255 , where 0 indicates completely
transparent, and 255 indicates completely opaque. |
Method Summary | |
---|---|
BufferedImage |
apply(BufferedImage img)
Applies a image filtering operation on an image. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Colorize(Color c)
Note: If the provided Color
does not have an alpha channel
(transparency channel), then the target image will be painted with an
opaque color, resulting in an image with only the specified color.
c
- Color to tint with.public Colorize(Color c, float alpha)
float
ranging from
0.0f
to 1.0f
, where 0.0f
indicates completely
transparent, and 1.0f
indicates completely opaque.
c
- Color to tint with.alpha
- The opacity of the tint.public Colorize(Color c, int alpha)
int
ranging from
0
to 255
, where 0
indicates completely
transparent, and 255
indicates completely opaque.
c
- Color to tint with.alpha
- The opacity of the tint.Method Detail |
---|
public BufferedImage apply(BufferedImage img)
ImageFilter
apply
in interface ImageFilter
img
- The image to apply the filtering on.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |