java.lang.Object
org.apache.batik.ext.awt.image.rendered.AbstractRed
org.apache.batik.ext.awt.image.rendered.Any2LsRGBRed
- All Implemented Interfaces:
- CachableRed, java.awt.image.RenderedImage
- public class Any2LsRGBRed
- extends AbstractRed
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: Any2LsRGBRed.java,v 1.6 2004/08/18 07:14:07 vhardy Exp $
|
Field Summary |
private static double |
GAMMA
Gamma for linear to sRGB convertion |
private static double |
LFACT
|
(package private) boolean |
srcIssRGB
|
private static int[] |
sRGBToLsRGBLut
Lookup tables for RGB lookups. |
| Fields inherited from class org.apache.batik.ext.awt.image.rendered.AbstractRed |
bounds, cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth |
| Methods inherited from class org.apache.batik.ext.awt.image.rendered.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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
srcIssRGB
boolean srcIssRGB
GAMMA
private static final double GAMMA
- Gamma for linear to sRGB convertion
- See Also:
- Constant Field Values
LFACT
private static final double LFACT
- See Also:
- Constant Field Values
sRGBToLsRGBLut
private static final int[] sRGBToLsRGBLut
- Lookup 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.
Any2LsRGBRed
public Any2LsRGBRed(CachableRed src)
- Construct a luminace image from src.
sRGBToLsRGB
public static final double sRGBToLsRGB(double value)
copyData
public java.awt.image.WritableRaster copyData(java.awt.image.WritableRaster wr)
fixColorModel
protected static java.awt.image.ColorModel fixColorModel(CachableRed src)
- 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
protected static java.awt.image.SampleModel fixSampleModel(CachableRed src)
- 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.