it.geosolutions.imageio.plugins.png
Class AbstractScanlineProvider

java.lang.Object
  extended by it.geosolutions.imageio.plugins.png.AbstractScanlineProvider
All Implemented Interfaces:
ar.com.hjg.pngj.IImageLine, ScanlineProvider
Direct Known Subclasses:
RasterByteABGRProvider, RasterByteRepackSingleBandProvider, RasterByteSingleBandProvider, RasterIntABGRProvider, RasterShortABGRProvider, RasterShortGrayAlphaProvider, RasterShortSingleBandProvider

public abstract class AbstractScanlineProvider
extends Object
implements ScanlineProvider

Base class providing common traits to all scanline providers

Author:
Andrea Aime - GeoSolutions

Field Summary
protected  byte bitDepth
           
protected  int currentRow
           
protected  it.geosolutions.imageio.plugins.png.ScanlineCursor cursor
           
protected  int height
           
protected  IndexColorModel palette
           
protected  int scanlineLength
           
protected  int width
           
 
Constructor Summary
protected AbstractScanlineProvider(Raster raster, byte bitDepth, int scanlineLength, IndexColorModel palette)
           
  AbstractScanlineProvider(Raster raster, int bitDepth, int scanlineLength)
           
  AbstractScanlineProvider(Raster raster, int bitDepth, int scanlineLength, IndexColorModel palette)
           
 
Method Summary
 void endReadFromPngRaw()
           
 byte getBitDepth()
          The bit depth of this image, 1, 2, 4, 8 or 16
 int getHeight()
          Image height
 IndexColorModel getPalette()
          Returns the palette for this image, or null if the image does not have one
 int getScanlineLength()
          The number of byte[] elements in the scaline
 int getWidth()
          Image width
 void readFromPngRaw(byte[] raw, int len, int offset, int step)
           
 void writeToPngRaw(byte[] raw)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface it.geosolutions.imageio.plugins.png.ScanlineProvider
next
 

Field Detail

width

protected final int width

height

protected final int height

scanlineLength

protected final int scanlineLength

cursor

protected final it.geosolutions.imageio.plugins.png.ScanlineCursor cursor

palette

protected final IndexColorModel palette

bitDepth

protected final byte bitDepth

currentRow

protected int currentRow
Constructor Detail

AbstractScanlineProvider

public AbstractScanlineProvider(Raster raster,
                                int bitDepth,
                                int scanlineLength)

AbstractScanlineProvider

public AbstractScanlineProvider(Raster raster,
                                int bitDepth,
                                int scanlineLength,
                                IndexColorModel palette)

AbstractScanlineProvider

protected AbstractScanlineProvider(Raster raster,
                                   byte bitDepth,
                                   int scanlineLength,
                                   IndexColorModel palette)
Method Detail

getWidth

public final int getWidth()
Description copied from interface: ScanlineProvider
Image width

Specified by:
getWidth in interface ScanlineProvider
Returns:

getHeight

public final int getHeight()
Description copied from interface: ScanlineProvider
Image height

Specified by:
getHeight in interface ScanlineProvider
Returns:

getBitDepth

public final byte getBitDepth()
Description copied from interface: ScanlineProvider
The bit depth of this image, 1, 2, 4, 8 or 16

Specified by:
getBitDepth in interface ScanlineProvider
Returns:

getPalette

public final IndexColorModel getPalette()
Description copied from interface: ScanlineProvider
Returns the palette for this image, or null if the image does not have one

Specified by:
getPalette in interface ScanlineProvider
Returns:

getScanlineLength

public final int getScanlineLength()
Description copied from interface: ScanlineProvider
The number of byte[] elements in the scaline

Specified by:
getScanlineLength in interface ScanlineProvider
Returns:

readFromPngRaw

public void readFromPngRaw(byte[] raw,
                           int len,
                           int offset,
                           int step)
Specified by:
readFromPngRaw in interface ar.com.hjg.pngj.IImageLine

endReadFromPngRaw

public void endReadFromPngRaw()
Specified by:
endReadFromPngRaw in interface ar.com.hjg.pngj.IImageLine

writeToPngRaw

public void writeToPngRaw(byte[] raw)
Specified by:
writeToPngRaw in interface ar.com.hjg.pngj.IImageLine


Copyright © 2006–2014 GeoSolutions. All rights reserved.