public class BgTransparencyFilter extends RGBImageFilter
T-Plan Robot Enterprise, (C) 2009-2025 T-Plan Limited. All rights reserved.
COMPLETESCANLINES, IMAGEABORTED, IMAGEERROR, RANDOMPIXELORDER, SINGLEFRAME, SINGLEFRAMEDONE, SINGLEPASS, STATICIMAGEDONE, TOPDOWNLEFTRIGHT
Constructor and Description |
---|
BgTransparencyFilter() |
BgTransparencyFilter(Color c) |
Modifier and Type | Method and Description |
---|---|
int |
filterRGB(int x,
int y,
int rgb)
Filter the given pixel to find out whether it is a good candidate for
transparency or not.
|
int |
getAlphaLimit() |
static Color |
getBestBgColor(int[] pixels,
Rectangle geometry)
Identify the best candidate for a background color.
|
Color |
getColor() |
int[] |
getCounters() |
int |
getLowerAlpha() |
int |
getMinAlphaForComparablePixels(int requiredComparablePixels) |
static int |
getMinAlphaForComparablePixels(int requiredComparablePixels,
int[] counters) |
int |
getNumberOfComparablePixels() |
int |
getNumberOfOpaquePixels() |
Rectangle |
getRectangle() |
int |
getUpperAlpha() |
boolean |
isEnablePartialTransparency() |
boolean |
isEnableStatistics() |
boolean |
isStatisticsOnly() |
void |
setAlphaLimit(int alphaLimit) |
void |
setColor(Color color) |
void |
setEnablePartialTransparency(boolean enablePartialTransparency) |
void |
setEnableStatistics(boolean enableStatistics) |
void |
setRectangle(Rectangle rectangle) |
void |
setStatisticsOnly(boolean statisticsOnly) |
filterIndexColorModel, filterRGBPixels, setColorModel, setPixels, setPixels, substituteColorModel
clone, getFilterInstance, imageComplete, resendTopDownLeftRight, setDimensions, setHints, setProperties
public BgTransparencyFilter(Color c)
public BgTransparencyFilter()
public static Color getBestBgColor(int[] pixels, Rectangle geometry)
pixels
- image pixels.geometry
- image geometry (dimensions)public void setColor(Color color)
public Color getColor()
public final int filterRGB(int x, int y, int rgb)
filterRGB
in class RGBImageFilter
x
- pixel x-coordinate.y
- pixel y-coordinate.rgb
- pixel RGB or RGBA.public int getNumberOfOpaquePixels()
public int getNumberOfComparablePixels()
public int getMinAlphaForComparablePixels(int requiredComparablePixels)
public static int getMinAlphaForComparablePixels(int requiredComparablePixels, int[] counters)
public int getAlphaLimit()
public void setAlphaLimit(int alphaLimit)
public boolean isEnablePartialTransparency()
public void setEnablePartialTransparency(boolean enablePartialTransparency)
enablePartialTransparency
- the enablePartialTransparency to setpublic boolean isEnableStatistics()
public void setEnableStatistics(boolean enableStatistics)
enableStatistics
- the enableStatistics to setpublic int getUpperAlpha()
public int getLowerAlpha()
public int[] getCounters()
public Rectangle getRectangle()
public void setRectangle(Rectangle rectangle)
rectangle
- the rectangle to setpublic boolean isStatisticsOnly()
public void setStatisticsOnly(boolean statisticsOnly)
statisticsOnly
- the statisticsOnly to set