org.apache.batik.ext.awt.image.rendered

Class Any2LumRed

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.
Constructor Summary
Any2LumRed(CachableRed src)
Construct a luminace image from src.
Method Summary
WritableRastercopyData(WritableRaster wr)
protected static ColorModelfixColorModel(CachableRed src)
This function 'fixes' the source's color model.
protected static SampleModelfixSampleModel(CachableRed src)
This function 'fixes' the source's sample model.

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 WritableRaster copyData(WritableRaster wr)

fixColorModel

protected static 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 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.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.