|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.coobird.thumbnailator.filters.Transparency
public class Transparency
An image filter which will make an image transparent.
The resulting image will always have an image type of
BufferedImage.TYPE_INT_ARGB
.
Constructor Summary | |
---|---|
Transparency(double alpha)
Instantiates a Transparency filter with the specified opacity. |
|
Transparency(float alpha)
Instantiates a Transparency filter with the specified opacity. |
Method Summary | |
---|---|
BufferedImage |
apply(BufferedImage img)
Applies a image filtering operation on an image. |
float |
getAlpha()
Returns the opacity of this filter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transparency(float alpha)
Transparency
filter with the specified opacity.
alpha
- The opacity of the resulting image. The value should be
between 0.0f
(transparent) to 1.0f
(opaque), inclusive.
IllegalArgumentException
- If the specified opacity is outside of
the range specified above.public Transparency(double alpha)
Transparency
filter with the specified opacity.
This is a convenience constructor for the
Transparency(float)
constructor.
alpha
- The opacity of the resulting image. The value should be
between 0.0f
(transparent) to 1.0f
(opaque), inclusive.
IllegalArgumentException
- If the specified opacity is outside of
the range specified above.Method Detail |
---|
public BufferedImage apply(BufferedImage img)
ImageFilter
apply
in interface ImageFilter
img
- The image to apply the filtering on.
public float getAlpha()
0.0f
(transparent) to
1.0f
(opaque).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |