org.apache.sanselan.formats.png
Class ScanExpediter

java.lang.Object
  extended by org.apache.sanselan.common.BinaryFileFunctions
      extended by org.apache.sanselan.common.BinaryFileParser
          extended by org.apache.sanselan.formats.png.ScanExpediter
All Implemented Interfaces:
BinaryConstants
Direct Known Subclasses:
ScanExpediterInterlaced, ScanExpediterSimple

public abstract class ScanExpediter
extends BinaryFileParser


Field Summary
protected  java.awt.image.BufferedImage bi
           
protected  int bitDepth
           
protected  int bitsPerPixel
           
protected  int bytesPerPixel
           
protected  int colorType
           
protected  GammaCorrection gammaCorrection
           
protected  int height
           
protected  java.io.InputStream is
           
protected  PNGChunkPLTE pngChunkPLTE
           
protected  TransparencyFilter transparencyFilter
           
protected  int width
           
 
Fields inherited from class org.apache.sanselan.common.BinaryFileFunctions
debug
 
Fields inherited from interface org.apache.sanselan.common.BinaryConstants
BYTE_ORDER_BIG_ENDIAN, BYTE_ORDER_INTEL, BYTE_ORDER_LEAST_SIGNIFICANT_BYTE, BYTE_ORDER_LITTLE_ENDIAN, BYTE_ORDER_LSB, BYTE_ORDER_MOST_SIGNIFICANT_BYTE, BYTE_ORDER_MOTOROLA, BYTE_ORDER_MSB, BYTE_ORDER_NETWORK
 
Constructor Summary
ScanExpediter(int width, int height, java.io.InputStream is, java.awt.image.BufferedImage bi, int color_type, int bitDepth, int bitsPerPixel, PNGChunkPLTE pngChunkPLTE, GammaCorrection gammaCorrection, TransparencyFilter transparencyFilter)
           
 
Method Summary
abstract  void drive()
           
protected  int getBitsToBytesRoundingUp(int bits)
           
protected  byte[] getNextScanline(java.io.InputStream is, int length, byte[] prev, int BytesPerPixel)
           
protected  int getPixelARGB(int alpha, int red, int green, int blue)
           
protected  int getPixelRGB(int red, int green, int blue)
           
protected  int getRGB(BitParser bitParser, int pixelIndexInScanline)
           
protected  ScanlineFilter getScanlineFilter(int filter_type, int BytesPerPixel)
           
protected  byte[] unfilterScanline(int filter_type, byte[] src, byte[] prev, int BytesPerPixel)
           
 
Methods inherited from class org.apache.sanselan.common.BinaryFileParser
byteArrayHasPrefix, convertByteArrayToInt, convertByteArrayToInt, convertByteArrayToShort, convertByteArrayToShort, getByteOrder, int2ToByteArray, read2Bytes, read3Bytes, read4Bytes, setByteOrder, setByteOrder
 
Methods inherited from class org.apache.sanselan.common.BinaryFileFunctions
CharsToQuad, compareByteArrays, compareByteArrays, compareBytes, compareBytes, convertByteArrayToDouble, convertByteArrayToDouble, convertByteArrayToDoubleArray, convertByteArrayToFloat, convertByteArrayToFloat, convertByteArrayToFloatArray, convertByteArrayToInt, convertByteArrayToInt, convertByteArrayToIntArray, convertByteArrayToRational, convertByteArrayToRational, convertByteArrayToRationalArray, convertByteArrayToShort, convertByteArrayToShort, convertByteArrayToShortArray, convertDoubleArrayToByteArray, convertDoubleToByteArray, convertFloatArrayToByteArray, convertFloatToByteArray, convertIntArrayToByteArray, convertIntArrayToRationalArray, convertRationalArrayToByteArray, convertRationalToByteArray, convertShortArrayToByteArray, convertShortToByteArray, copyStreamToStream, debugByteArray, debugNumber, debugNumber, debugNumber, debugNumber, debugNumberArray, findNull, findNull, getBytearrayHead, getByteArrayTail, getDebug, getRAFBytes, getStreamBytes, head, int2ToByteArray, printByteBits, printCharQuad, printCharQuad, read2Bytes, read3Bytes, read4Bytes, readAndVerifyBytes, readAndVerifyBytes, readByte, readBytearray, readByteArray, readByteArray, readBytes, readRandomBytes, scanForByte, setDebug, skipBytes, skipBytes, slice, startsWith, tail, writeIntInToByteArray
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

protected final int width

height

protected final int height

is

protected final java.io.InputStream is

bi

protected final java.awt.image.BufferedImage bi

colorType

protected final int colorType

bitDepth

protected final int bitDepth

bytesPerPixel

protected final int bytesPerPixel

bitsPerPixel

protected final int bitsPerPixel

pngChunkPLTE

protected final PNGChunkPLTE pngChunkPLTE

gammaCorrection

protected final GammaCorrection gammaCorrection

transparencyFilter

protected final TransparencyFilter transparencyFilter
Constructor Detail

ScanExpediter

public ScanExpediter(int width,
                     int height,
                     java.io.InputStream is,
                     java.awt.image.BufferedImage bi,
                     int color_type,
                     int bitDepth,
                     int bitsPerPixel,
                     PNGChunkPLTE pngChunkPLTE,
                     GammaCorrection gammaCorrection,
                     TransparencyFilter transparencyFilter)
Method Detail

getBitsToBytesRoundingUp

protected int getBitsToBytesRoundingUp(int bits)

getPixelARGB

protected final int getPixelARGB(int alpha,
                                 int red,
                                 int green,
                                 int blue)

getPixelRGB

protected final int getPixelRGB(int red,
                                int green,
                                int blue)

drive

public abstract void drive()
                    throws ImageReadException,
                           java.io.IOException
Throws:
ImageReadException
java.io.IOException

getRGB

protected int getRGB(BitParser bitParser,
                     int pixelIndexInScanline)
              throws ImageReadException,
                     java.io.IOException
Throws:
ImageReadException
java.io.IOException

getScanlineFilter

protected ScanlineFilter getScanlineFilter(int filter_type,
                                           int BytesPerPixel)
                                    throws ImageReadException,
                                           java.io.IOException
Throws:
ImageReadException
java.io.IOException

unfilterScanline

protected byte[] unfilterScanline(int filter_type,
                                  byte[] src,
                                  byte[] prev,
                                  int BytesPerPixel)
                           throws ImageReadException,
                                  java.io.IOException
Throws:
ImageReadException
java.io.IOException

getNextScanline

protected byte[] getNextScanline(java.io.InputStream is,
                                 int length,
                                 byte[] prev,
                                 int BytesPerPixel)
                          throws ImageReadException,
                                 java.io.IOException
Throws:
ImageReadException
java.io.IOException


Copyright © 2007-2009. All Rights Reserved.