Class Any2sRGBRed
java.lang.Object
org.apache.batik.ext.awt.image.rendered.AbstractRed
org.apache.batik.ext.awt.image.rendered.Any2sRGBRed
- All Implemented Interfaces:
RenderedImage, CachableRed
This function will tranform an image from any colorspace into a
luminance image. The alpha channel if any will be copied to the
new image.
- Version:
- $Id$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final doubleExponent for linear to sRGB convertionprivate static final int[]Lookup tables for RGB lookups.(package private) booleanFields inherited from class AbstractRed
bounds, cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WritableRasterapplyLut_INT(WritableRaster wr, int[] lut) protected static ColorModelfixColorModel(CachableRed src) This function 'fixes' the source's color model.protected static SampleModelThis function 'fixes' the source's sample model.static booleanMethods inherited from class AbstractRed
copyBand, copyToRaster, getBounds, getColorModel, getData, getData, getDependencyRegion, getDirtyRegion, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getPropertyNames, getSampleModel, getSources, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getWidth, getXTile, getYTile, init, init, makeTile, updateTileGridInfo
-
Field Details
-
srcIsLsRGB
boolean srcIsLsRGB -
GAMMA
private static final double GAMMAExponent for linear to sRGB convertion- See Also:
-
linearToSRGBLut
private static final int[] linearToSRGBLutLookup tables for RGB lookups. The linearToSRGBLut is used when noise values are considered to be on a linearScale. The linearToLinear table is used when the values are considered to be on the sRGB scale to begin with.
-
-
Constructor Details
-
Any2sRGBRed
Construct a luminance image from src.- Parameters:
src- The image to convert to a luminance image
-
-
Method Details
-
is_INT_PACK_COMP
-
applyLut_INT
-
copyData
-
fixColorModel
This function 'fixes' the source's color model. Right now it just selects if it should have one or two bands based on if the source had an alpha channel. -
fixSampleModel
This function 'fixes' the source's sample model. Right now it just selects if it should have 3 or 4 bands based on if the source had an alpha channel.
-