Class PCXImageReader
- java.lang.Object
-
- javax.imageio.ImageReader
-
- com.github.jaiimageio.impl.plugins.pcx.PCXImageReader
-
- All Implemented Interfaces:
PCXConstants
public class PCXImageReader extends javax.imageio.ImageReader implements PCXConstants
-
-
Field Summary
Fields Modifier and Type Field Description private java.awt.image.BufferedImage
bi
The destination image.private short
bytesPerLine
private java.awt.image.ColorModel
colorModel
private byte
colorPlanes
private int[]
destBands
source and destination bands.private java.awt.Rectangle
destinationRegion
The destination region.private byte
encoding
private boolean
gotHeader
private int
height
private javax.imageio.stream.ImageInputStream
iis
private byte[]
largePalette
private byte
manufacturer
private PCXMetadata
metadata
private boolean
noTransform
Indicates whether subsampled, subregion is required, and offset is definedprivate java.awt.image.ColorModel
originalColorModel
private java.awt.image.SampleModel
originalSampleModel
private short
paletteType
private java.awt.image.SampleModel
sampleModel
private int
scaleX
The scaling factors.private int
scaleY
The scaling factors.private boolean
seleBand
Indicates whether subband is selected.private byte[]
smallPalette
private int[]
sourceBands
source and destination bands.private java.awt.Rectangle
sourceRegion
The source region.private int
width
private short
xmax
private short
ymax
-
Fields inherited from class javax.imageio.ImageReader
availableLocales, ignoreMetadata, input, locale, minIndex, originatingProvider, progressListeners, seekForwardOnly, updateListeners, warningListeners, warningLocales
-
Fields inherited from interface com.github.jaiimageio.impl.plugins.pcx.PCXConstants
ENCODING, MANUFACTURER, PALETTE_COLOR, PALETTE_GRAYSCALE, VERSION_2_5, VERSION_2_8_W_PALETTE, VERSION_2_8_WO_PALETTE, VERSION_3_0, VERSION_PC_WINDOWS
-
-
Constructor Summary
Constructors Constructor Description PCXImageReader(PCXImageReaderSpi imageReaderSpi)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkIndex(int imageIndex)
int
getHeight(int imageIndex)
javax.imageio.metadata.IIOMetadata
getImageMetadata(int imageIndex)
java.util.Iterator
getImageTypes(int imageIndex)
int
getNumImages(boolean allowSearch)
javax.imageio.metadata.IIOMetadata
getStreamMetadata()
int
getWidth(int imageIndex)
java.awt.image.BufferedImage
read(int imageIndex, javax.imageio.ImageReadParam param)
private void
read1Bit(byte[] data)
private void
read4Bit(byte[] data)
private void
read8Bit(byte[] data)
private void
readHeader()
private void
readImage(byte[] data)
private void
readScanLine(byte[] buffer)
void
setInput(java.lang.Object input, boolean seekForwardOnly, boolean ignoreMetadata)
-
Methods inherited from class javax.imageio.ImageReader
abort, abortRequested, addIIOReadProgressListener, addIIOReadUpdateListener, addIIOReadWarningListener, canReadRaster, checkReadParamBandSettings, clearAbortRequest, computeRegions, dispose, getAspectRatio, getAvailableLocales, getDefaultReadParam, getDestination, getFormatName, getImageMetadata, getInput, getLocale, getMinIndex, getNumThumbnails, getOriginatingProvider, getRawImageType, getSourceRegion, getStreamMetadata, getThumbnailHeight, getThumbnailWidth, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, hasThumbnails, isIgnoringMetadata, isImageTiled, isRandomAccessEasy, isSeekForwardOnly, processImageComplete, processImageProgress, processImageStarted, processImageUpdate, processPassComplete, processPassStarted, processReadAborted, processSequenceComplete, processSequenceStarted, processThumbnailComplete, processThumbnailPassComplete, processThumbnailPassStarted, processThumbnailProgress, processThumbnailStarted, processThumbnailUpdate, processWarningOccurred, processWarningOccurred, read, readAll, readAll, readAsRenderedImage, readerSupportsThumbnails, readRaster, readThumbnail, readTile, readTileRaster, removeAllIIOReadProgressListeners, removeAllIIOReadUpdateListeners, removeAllIIOReadWarningListeners, removeIIOReadProgressListener, removeIIOReadUpdateListener, removeIIOReadWarningListener, reset, setInput, setInput, setLocale
-
-
-
-
Field Detail
-
iis
private javax.imageio.stream.ImageInputStream iis
-
width
private int width
-
height
private int height
-
gotHeader
private boolean gotHeader
-
manufacturer
private byte manufacturer
-
encoding
private byte encoding
-
xmax
private short xmax
-
ymax
private short ymax
-
smallPalette
private byte[] smallPalette
-
largePalette
private byte[] largePalette
-
colorPlanes
private byte colorPlanes
-
bytesPerLine
private short bytesPerLine
-
paletteType
private short paletteType
-
metadata
private PCXMetadata metadata
-
sampleModel
private java.awt.image.SampleModel sampleModel
-
originalSampleModel
private java.awt.image.SampleModel originalSampleModel
-
colorModel
private java.awt.image.ColorModel colorModel
-
originalColorModel
private java.awt.image.ColorModel originalColorModel
-
destinationRegion
private java.awt.Rectangle destinationRegion
The destination region.
-
sourceRegion
private java.awt.Rectangle sourceRegion
The source region.
-
bi
private java.awt.image.BufferedImage bi
The destination image.
-
noTransform
private boolean noTransform
Indicates whether subsampled, subregion is required, and offset is defined
-
seleBand
private boolean seleBand
Indicates whether subband is selected.
-
scaleX
private int scaleX
The scaling factors.
-
scaleY
private int scaleY
The scaling factors.
-
sourceBands
private int[] sourceBands
source and destination bands.
-
destBands
private int[] destBands
source and destination bands.
-
-
Constructor Detail
-
PCXImageReader
public PCXImageReader(PCXImageReaderSpi imageReaderSpi)
-
-
Method Detail
-
setInput
public void setInput(java.lang.Object input, boolean seekForwardOnly, boolean ignoreMetadata)
- Overrides:
setInput
in classjavax.imageio.ImageReader
-
getHeight
public int getHeight(int imageIndex) throws java.io.IOException
- Specified by:
getHeight
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getImageMetadata
public javax.imageio.metadata.IIOMetadata getImageMetadata(int imageIndex) throws java.io.IOException
- Specified by:
getImageMetadata
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getImageTypes
public java.util.Iterator getImageTypes(int imageIndex) throws java.io.IOException
- Specified by:
getImageTypes
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getNumImages
public int getNumImages(boolean allowSearch) throws java.io.IOException
- Specified by:
getNumImages
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getStreamMetadata
public javax.imageio.metadata.IIOMetadata getStreamMetadata() throws java.io.IOException
- Specified by:
getStreamMetadata
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
getWidth
public int getWidth(int imageIndex) throws java.io.IOException
- Specified by:
getWidth
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
read
public java.awt.image.BufferedImage read(int imageIndex, javax.imageio.ImageReadParam param) throws java.io.IOException
- Specified by:
read
in classjavax.imageio.ImageReader
- Throws:
java.io.IOException
-
readImage
private void readImage(byte[] data) throws java.io.IOException
- Throws:
java.io.IOException
-
read1Bit
private void read1Bit(byte[] data) throws java.io.IOException
- Throws:
java.io.IOException
-
read4Bit
private void read4Bit(byte[] data) throws java.io.IOException
- Throws:
java.io.IOException
-
read8Bit
private void read8Bit(byte[] data) throws java.io.IOException
- Throws:
java.io.IOException
-
readScanLine
private void readScanLine(byte[] buffer) throws java.io.IOException
- Throws:
java.io.IOException
-
checkIndex
private void checkIndex(int imageIndex)
-
readHeader
private void readHeader() throws java.io.IOException
- Throws:
java.io.IOException
-
-