Package com.itextpdf.text.pdf.codec
Class JBIG2Image
- java.lang.Object
-
- com.itextpdf.text.pdf.codec.JBIG2Image
-
public class JBIG2Image extends java.lang.Object
Support for JBIG2 Images. This class assumes that we are always embedding into a pdf.- Since:
- 2.1.5
-
-
Constructor Summary
Constructors Constructor Description JBIG2Image()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
getGlobalSegment(RandomAccessFileOrArray ra)
Gets a byte array that can be used as a /JBIG2Globals, or null if not applicable to the given jbig2.static Image
getJbig2Image(RandomAccessFileOrArray ra, int page)
returns an Image representing the given page.static int
getNumberOfPages(RandomAccessFileOrArray ra)
Gets the number of pages in a JBIG2 image.
-
-
-
Method Detail
-
getGlobalSegment
public static byte[] getGlobalSegment(RandomAccessFileOrArray ra)
Gets a byte array that can be used as a /JBIG2Globals, or null if not applicable to the given jbig2.- Parameters:
ra
- an random access file or array- Returns:
- a byte array
-
getJbig2Image
public static Image getJbig2Image(RandomAccessFileOrArray ra, int page)
returns an Image representing the given page.- Parameters:
ra
- the file or array containing the imagepage
- the page number of the image- Returns:
- an Image object
-
getNumberOfPages
public static int getNumberOfPages(RandomAccessFileOrArray ra)
Gets the number of pages in a JBIG2 image.- Parameters:
ra
- a random acces file array containing a JBIG2 image- Returns:
- the number of pages
-
-