Package com.itextpdf.io.image
Class Jbig2ImageData
java.lang.Object
com.itextpdf.io.image.ImageData
com.itextpdf.io.image.Jbig2ImageData
Image data for a selected page of a JBIG2 image.
-
Field Summary
Fields inherited from class com.itextpdf.io.image.ImageData
bpc, colorEncodingComponentsNumber, colorTransform, data, decode, decodeParms, deflated, dpiX, dpiY, filter, height, imageAttributes, imageMask, imageSize, interpolation, inverted, mask, mySerialId, originalType, profile, rotation, transparency, url, width, XYRatio -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJbig2ImageData(byte[] bytes, int page) Creates JBIG2 image data from encoded bytes.protectedJbig2ImageData(URL url, int page) Creates JBIG2 image data to be loaded from a URL. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if image can be inlinestatic intgetNumberOfPages(byte[] bytes) Gets the number of pages in a JBIG2 image.static intGets the number of pages in a JBIG2 image.intgetPage()Gets the selected page number.Methods inherited from class com.itextpdf.io.image.ImageData
canBeMask, getBpc, getColorEncodingComponentsNumber, getColorTransform, getData, getDecode, getDecodeParms, getDpiX, getDpiY, getFilter, getHeight, getImageAttributes, getImageMask, getOriginalType, getProfile, getRotation, getTransparency, getUrl, getWidth, getXYRatio, isDeflated, isInterpolation, isInverted, isMask, isRawImage, isSoftMask, loadData, makeMask, setBpc, setColorEncodingComponentsNumber, setColorTransform, setDecode, setDeflated, setDpi, setFilter, setHeight, setImageAttributes, setImageMask, setInterpolation, setInverted, setProfile, setRotation, setTransparency, setUrl, setWidth, setXYRatio
-
Constructor Details
-
Jbig2ImageData
Creates JBIG2 image data to be loaded from a URL.- Parameters:
-
url- source URL, notnull -
page- one-based JBIG2 page number
-
Jbig2ImageData
protected Jbig2ImageData(byte[] bytes, int page) Creates JBIG2 image data from encoded bytes.- Parameters:
-
bytes- encoded JBIG2 bytes; the array is retained -
page- one-based JBIG2 page number
-
-
Method Details
-
getPage
public int getPage()Gets the selected page number.- Returns:
- one-based JBIG2 page number
-
getNumberOfPages
public static int getNumberOfPages(byte[] bytes) Gets the number of pages in a JBIG2 image.- Parameters:
-
bytes- a byte array containing a JBIG2 image - Returns:
- the number of pages
-
getNumberOfPages
Gets the number of pages in a JBIG2 image.- Parameters:
-
raf- aRandomAccessFileOrArraycontaining a JBIG2 image - Returns:
- the number of pages
-
canImageBeInline
public boolean canImageBeInline()Checks if image can be inline- Overrides:
-
canImageBeInlinein classImageData - Returns:
-
false, because JBIG2 images require a JBIG2Decode filter
-