Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xmlgraphics.image.rendered
Class Any2sRGBRed

    java.lang.Object
      org.apache.xmlgraphics.image.rendered.AbstractRed
          org.apache.xmlgraphics.image.rendered.Any2sRGBRed

All Implemented Interfaces:
  RenderedImage, CachableRed

    public class Any2sRGBRed

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: Any2sRGBRed.java 1732018 2016-02-24 04:51:06Z gadams $ Originally authored by Thomas DeWeese.

Field Summary

Fields inherited from class org.apache.xmlgraphics.image.rendered.AbstractRed
`bounds, cm, minTileX, minTileY, numXTiles, numYTiles, props, sm, srcs, tileGridXOff, tileGridYOff, tileHeight, tileWidth`

Constructor Summary
`Any2sRGBRed(CachableRed src)` Construct a luminace image from src.

Method Summary
`static WritableRaster` | `applyLut_INT(WritableRaster wr, int[] lut)`
`WritableRaster` | `copyData(WritableRaster wr)`
`protected static ColorModel` | `fixColorModel(CachableRed src)` This function 'fixes' the source's color model.
`protected static SampleModel` | `fixSampleModel(CachableRed src)` This function 'fixes' the source's sample model.
`static boolean` | `is_INT_PACK_COMP(SampleModel sm)`

Methods inherited from class org.apache.xmlgraphics.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`

Constructor Detail

### Any2sRGBRed

    public Any2sRGBRed(CachableRed src)

  Construct a luminace image from src.

  Parameters:
    `src` - The image to convert to a luminance image

Method Detail

### is_INT_PACK_COMP

    public static boolean is_INT_PACK_COMP(SampleModel sm)

### applyLut_INT

    public static WritableRaster applyLut_INT(WritableRaster wr,
                                              int[] lut)

### 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 3 or 4 bands based on if the source had an alpha channel.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| xmlgraphics-commons 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.