Class Any2LumRed
- java.lang.Object
-
- org.apache.batik.ext.awt.image.rendered.AbstractRed
-
- org.apache.batik.ext.awt.image.rendered.Any2LumRed
-
- All Implemented Interfaces:
java.awt.image.RenderedImage,CachableRed
public class Any2LumRed 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: Any2LumRed.java 1808000 2017-09-11 08:51:52Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanisColorConvertOpAplhaSupported-
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
-
-
Constructor Summary
Constructors Constructor Description Any2LumRed(CachableRed src)Construct a luminace image from src.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.image.WritableRastercopyData(java.awt.image.WritableRaster wr)protected static java.awt.image.ColorModelfixColorModel(CachableRed src)This function 'fixes' the source's color model.protected static java.awt.image.SampleModelfixSampleModel(CachableRed src)This function 'fixes' the source's sample model.protected static intgetAlpha(java.awt.image.BufferedImage bufferedImage)protected static booleangetColorConvertOpAplhaSupported()-
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
-
-
-
-
Constructor Detail
-
Any2LumRed
public Any2LumRed(CachableRed src)
Construct a luminace image from src.- Parameters:
src- The image to convert to a luminance image
-
-
Method Detail
-
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 one or two bands based on if the source had an alpha channel.
-
getColorConvertOpAplhaSupported
protected static boolean getColorConvertOpAplhaSupported()
-
getAlpha
protected static int getAlpha(java.awt.image.BufferedImage bufferedImage)
-
-