Package org.jpedal.jbig2.image
Class JBIG2Bitmap
java.lang.Object
org.jpedal.jbig2.image.JBIG2Bitmap
JBIG2Bitmap class.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionJBIG2Bitmap
(int width, int height, ArithmeticDecoder arithmeticDecoder, HuffmanDecoder huffmanDecoder, MMRDecoder mmrDecoder) Constructor for JBIG2Bitmap. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear
(int defPixel) clear.void
combine
(JBIG2Bitmap bitmap, int x, int y, long combOp) combine.void
expand
(int newHeight, int defaultPixel) expand.getBufferedImage.byte[]
getData
(boolean switchPixelColor) Getter for the fielddata
.int
getPixel
(int col, int row) getPixel.getSlice
(int x, int y, int width, int height) getSlice.void
readBitmap
(boolean useMMR, int template, boolean typicalPredictionGenericDecodingOn, boolean useSkip, JBIG2Bitmap skipBitmap, short[] adaptiveTemplateX, short[] adaptiveTemplateY, int mmrDataLength) readBitmap.void
readGenericRefinementRegion
(int template, boolean typicalPredictionGenericRefinementOn, JBIG2Bitmap referredToBitmap, int referenceDX, int referenceDY, short[] adaptiveTemplateX, short[] adaptiveTemplateY) readGenericRefinementRegion.void
readTextRegion
(boolean huffman, boolean symbolRefine, int noOfSymbolInstances, int logStrips, int noOfSymbols, int[][] symbolCodeTable, int symbolCodeLength, JBIG2Bitmap[] symbols, int defaultPixel, int combinationOperator, boolean transposed, int referenceCorner, int sOffset, int[][] huffmanFSTable, int[][] huffmanDSTable, int[][] huffmanDTTable, int[][] huffmanRDWTable, int[][] huffmanRDHTable, int[][] huffmanRDXTable, int[][] huffmanRDYTable, int[][] huffmanRSizeTable, int template, short[] symbolRegionAdaptiveTemplateX, short[] symbolRegionAdaptiveTemplateY, JBIG2StreamDecoder decoder) readTextRegion.void
setPixel
(int col, int row, int value) setPixel.
-
Field Details
-
data
public org.jpedal.jbig2.image.JBIG2Bitmap.FastBitSet data
-
-
Constructor Details
-
JBIG2Bitmap
public JBIG2Bitmap(int width, int height, ArithmeticDecoder arithmeticDecoder, HuffmanDecoder huffmanDecoder, MMRDecoder mmrDecoder) Constructor for JBIG2Bitmap.
- Parameters:
width
- aInteger
object.height
- aInteger
object.arithmeticDecoder
- aArithmeticDecoder
object.huffmanDecoder
- aHuffmanDecoder
object.mmrDecoder
- aMMRDecoder
object.
-
-
Method Details
-
readBitmap
public void readBitmap(boolean useMMR, int template, boolean typicalPredictionGenericDecodingOn, boolean useSkip, JBIG2Bitmap skipBitmap, short[] adaptiveTemplateX, short[] adaptiveTemplateY, int mmrDataLength) throws IOException, JBIG2Exception readBitmap.
- Parameters:
useMMR
- a boolean.template
- aInteger
object.typicalPredictionGenericDecodingOn
- a boolean.useSkip
- a boolean.skipBitmap
- aJBIG2Bitmap
object.adaptiveTemplateX
- an array ofinvalid reference
short
adaptiveTemplateY
- an array ofinvalid reference
short
mmrDataLength
- aInteger
object.- Throws:
IOException
- if any.JBIG2Exception
- if any.
-
readGenericRefinementRegion
public void readGenericRefinementRegion(int template, boolean typicalPredictionGenericRefinementOn, JBIG2Bitmap referredToBitmap, int referenceDX, int referenceDY, short[] adaptiveTemplateX, short[] adaptiveTemplateY) throws IOException, JBIG2Exception readGenericRefinementRegion.
- Parameters:
template
- aInteger
object.typicalPredictionGenericRefinementOn
- a boolean.referredToBitmap
- aJBIG2Bitmap
object.referenceDX
- aInteger
object.referenceDY
- aInteger
object.adaptiveTemplateX
- an array ofinvalid reference
short
adaptiveTemplateY
- an array ofinvalid reference
short
- Throws:
IOException
- if any.JBIG2Exception
- if any.
-
readTextRegion
public void readTextRegion(boolean huffman, boolean symbolRefine, int noOfSymbolInstances, int logStrips, int noOfSymbols, int[][] symbolCodeTable, int symbolCodeLength, JBIG2Bitmap[] symbols, int defaultPixel, int combinationOperator, boolean transposed, int referenceCorner, int sOffset, int[][] huffmanFSTable, int[][] huffmanDSTable, int[][] huffmanDTTable, int[][] huffmanRDWTable, int[][] huffmanRDHTable, int[][] huffmanRDXTable, int[][] huffmanRDYTable, int[][] huffmanRSizeTable, int template, short[] symbolRegionAdaptiveTemplateX, short[] symbolRegionAdaptiveTemplateY, JBIG2StreamDecoder decoder) throws JBIG2Exception, IOException readTextRegion.
- Parameters:
huffman
- a boolean.symbolRefine
- a boolean.noOfSymbolInstances
- aInteger
object.logStrips
- aInteger
object.noOfSymbols
- aInteger
object.symbolCodeTable
- an array ofinvalid reference
int
symbolCodeLength
- aInteger
object.symbols
- an array ofJBIG2Bitmap
objects.defaultPixel
- aInteger
object.combinationOperator
- aInteger
object.transposed
- a boolean.referenceCorner
- aInteger
object.sOffset
- aInteger
object.huffmanFSTable
- an array ofinvalid reference
int
huffmanDSTable
- an array ofinvalid reference
int
huffmanDTTable
- an array ofinvalid reference
int
huffmanRDWTable
- an array ofinvalid reference
int
huffmanRDHTable
- an array ofinvalid reference
int
huffmanRDXTable
- an array ofinvalid reference
int
huffmanRDYTable
- an array ofinvalid reference
int
huffmanRSizeTable
- an array ofinvalid reference
int
template
- aInteger
object.symbolRegionAdaptiveTemplateX
- an array ofinvalid reference
short
symbolRegionAdaptiveTemplateY
- an array ofinvalid reference
short
decoder
- aJBIG2StreamDecoder
object.- Throws:
JBIG2Exception
- if any.IOException
- if any.
-
clear
public void clear(int defPixel) clear.
- Parameters:
defPixel
- aInteger
object.
-
combine
combine.
- Parameters:
bitmap
- aJBIG2Bitmap
object.x
- aInteger
object.y
- aInteger
object.combOp
- a long.
-
getData
public byte[] getData(boolean switchPixelColor) Getter for the field
data
.- Parameters:
switchPixelColor
- a boolean.- Returns:
- an array of
invalid reference
byte
-
getSlice
getSlice.
- Parameters:
x
- aInteger
object.y
- aInteger
object.width
- aInteger
object.height
- aInteger
object.- Returns:
- a
JBIG2Bitmap
object.
-
setPixel
public void setPixel(int col, int row, int value) setPixel.
-
getPixel
public int getPixel(int col, int row) getPixel.
-
expand
public void expand(int newHeight, int defaultPixel) expand.
-
getBufferedImage
getBufferedImage.
- Returns:
- a
BufferedImage
object.
-