Package org.jpedal.jbig2.image
Class JBIG2Bitmap
java.lang.Object
org.jpedal.jbig2.image.JBIG2Bitmap
JBIG2Bitmap class.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJBIG2Bitmap(int width, int height, ArithmeticDecoder arithmeticDecoder, HuffmanDecoder huffmanDecoder, MMRDecoder mmrDecoder) Constructor for JBIG2Bitmap. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear(int defPixel) clear.voidcombine(JBIG2Bitmap bitmap, int x, int y, long combOp) combine.voidexpand(int newHeight, int defaultPixel) expand.getBufferedImage.byte[]getData(boolean switchPixelColor) Getter for the fielddata.intgetPixel(int col, int row) getPixel.getSlice(int x, int y, int width, int height) getSlice.voidreadBitmap(boolean useMMR, int template, boolean typicalPredictionGenericDecodingOn, boolean useSkip, JBIG2Bitmap skipBitmap, short[] adaptiveTemplateX, short[] adaptiveTemplateY, int mmrDataLength) readBitmap.voidreadGenericRefinementRegion(int template, boolean typicalPredictionGenericRefinementOn, JBIG2Bitmap referredToBitmap, int referenceDX, int referenceDY, short[] adaptiveTemplateX, short[] adaptiveTemplateY) readGenericRefinementRegion.voidreadTextRegion(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.voidsetPixel(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- aIntegerobject.height- aIntegerobject.arithmeticDecoder- aArithmeticDecoderobject.huffmanDecoder- aHuffmanDecoderobject.mmrDecoder- aMMRDecoderobject.
-
-
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- aIntegerobject.typicalPredictionGenericDecodingOn- a boolean.useSkip- a boolean.skipBitmap- aJBIG2Bitmapobject.adaptiveTemplateX- an array ofobjects.invalid reference
shortadaptiveTemplateY- an array ofobjects.invalid reference
shortmmrDataLength- aIntegerobject.- 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- aIntegerobject.typicalPredictionGenericRefinementOn- a boolean.referredToBitmap- aJBIG2Bitmapobject.referenceDX- aIntegerobject.referenceDY- aIntegerobject.adaptiveTemplateX- an array ofobjects.invalid reference
shortadaptiveTemplateY- an array ofobjects.invalid 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- aIntegerobject.logStrips- aIntegerobject.noOfSymbols- aIntegerobject.symbolCodeTable- an array ofobjects.invalid reference
intsymbolCodeLength- aIntegerobject.symbols- an array ofJBIG2Bitmapobjects.defaultPixel- aIntegerobject.combinationOperator- aIntegerobject.transposed- a boolean.referenceCorner- aIntegerobject.sOffset- aIntegerobject.huffmanFSTable- an array ofobjects.invalid reference
inthuffmanDSTable- an array ofobjects.invalid reference
inthuffmanDTTable- an array ofobjects.invalid reference
inthuffmanRDWTable- an array ofobjects.invalid reference
inthuffmanRDHTable- an array ofobjects.invalid reference
inthuffmanRDXTable- an array ofobjects.invalid reference
inthuffmanRDYTable- an array ofobjects.invalid reference
inthuffmanRSizeTable- an array ofobjects.invalid reference
inttemplate- aIntegerobject.symbolRegionAdaptiveTemplateX- an array ofobjects.invalid reference
shortsymbolRegionAdaptiveTemplateY- an array ofobjects.invalid reference
shortdecoder- aJBIG2StreamDecoderobject.- Throws:
JBIG2Exception- if any.IOException- if any.
-
clear
public void clear(int defPixel) clear.
- Parameters:
defPixel- aIntegerobject.
-
combine
combine.
- Parameters:
bitmap- aJBIG2Bitmapobject.x- aIntegerobject.y- aIntegerobject.combOp- a long.
-
getData
public byte[] getData(boolean switchPixelColor) Getter for the field
data.- Parameters:
switchPixelColor- a boolean.- Returns:
- an array of
objects.
invalid reference
byte
-
getSlice
getSlice.
- Parameters:
x- aIntegerobject.y- aIntegerobject.width- aIntegerobject.height- aIntegerobject.- Returns:
- a
JBIG2Bitmapobject.
-
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
BufferedImageobject.
-