Package com.itextpdf.io.image
Class RawImageData
java.lang.Object
com.itextpdf.io.image.ImageData
com.itextpdf.io.image.RawImageData
- Direct Known Subclasses:
-
BmpImageData,PngImageData,TiffImageData
Image data encoded as raw samples or CCITT-compressed bilevel samples.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intA flag indicating whether 1-bits are to be interpreted as black pixels and 0-bits as white pixels,static final intA flag indicating whether the filter expects extra 0-bits before each encoded line so that the line begins on a byte boundary.static final intA flag indicating whether the filter expects the encoded data to be terminated by an end-of-block pattern, overriding the Rows parameter.static final intA flag indicating whether end-of-line bit patterns are required to be present in the encoding.static final intPure one-dimensional encoding (Group 3, 1-D)static final intMixed one- and two-dimensional encoding (Group 3, 2-D)static final intPure two-dimensional encoding (Group 4)protected intCCITT compression type when the image uses CCITT encoding.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
ConstructorsModifierConstructorDescriptionprotectedRawImageData(byte[] bytes, ImageType type) Creates raw image data from encoded bytes.protectedRawImageData(URL url, ImageType type) Creates raw image data whose bytes are available from a URL. -
Method Summary
Modifier and TypeMethodDescriptionintGets the CCITT compression type.booleanIndicates whether this instance represents raw sample data.voidsetTypeCcitt(int typeCcitt) Sets the CCITT compression type.Methods inherited from class com.itextpdf.io.image.ImageData
canBeMask, canImageBeInline, getBpc, getColorEncodingComponentsNumber, getColorTransform, getData, getDecode, getDecodeParms, getDpiX, getDpiY, getFilter, getHeight, getImageAttributes, getImageMask, getOriginalType, getProfile, getRotation, getTransparency, getUrl, getWidth, getXYRatio, isDeflated, isInterpolation, isInverted, isMask, isSoftMask, loadData, makeMask, setBpc, setColorEncodingComponentsNumber, setColorTransform, setDecode, setDeflated, setDpi, setFilter, setHeight, setImageAttributes, setImageMask, setInterpolation, setInverted, setProfile, setRotation, setTransparency, setUrl, setWidth, setXYRatio
-
Field Details
-
CCITTG4
public static final int CCITTG4Pure two-dimensional encoding (Group 4)- See Also:
-
CCITTG3_1D
public static final int CCITTG3_1DPure one-dimensional encoding (Group 3, 1-D)- See Also:
-
CCITTG3_2D
public static final int CCITTG3_2DMixed one- and two-dimensional encoding (Group 3, 2-D)- See Also:
-
CCITT_BLACKIS1
public static final int CCITT_BLACKIS1A flag indicating whether 1-bits are to be interpreted as black pixels and 0-bits as white pixels,- See Also:
-
CCITT_ENCODEDBYTEALIGN
public static final int CCITT_ENCODEDBYTEALIGNA flag indicating whether the filter expects extra 0-bits before each encoded line so that the line begins on a byte boundary.- See Also:
-
CCITT_ENDOFLINE
public static final int CCITT_ENDOFLINEA flag indicating whether end-of-line bit patterns are required to be present in the encoding.- See Also:
-
CCITT_ENDOFBLOCK
public static final int CCITT_ENDOFBLOCKA flag indicating whether the filter expects the encoded data to be terminated by an end-of-block pattern, overriding the Rows parameter. The use of this flag will set the key /EndOfBlock to false.- See Also:
-
typeCcitt
protected int typeCcittCCITT compression type when the image uses CCITT encoding.
-
-
Constructor Details
-
RawImageData
Creates raw image data whose bytes are available from a URL.- Parameters:
-
url- source URL, notnull -
type- declared source image type
-
RawImageData
Creates raw image data from encoded bytes.- Parameters:
-
bytes- encoded image bytes; the array is retained -
type- declared source image type
-
-
Method Details
-
isRawImage
public boolean isRawImage()Indicates whether this instance represents raw sample data.- Overrides:
-
isRawImagein classImageData - Returns:
-
true
-
getTypeCcitt
public int getTypeCcitt()Gets the CCITT compression type.- Returns:
- CCITT compression type
-
setTypeCcitt
public void setTypeCcitt(int typeCcitt) Sets the CCITT compression type.- Parameters:
-
typeCcitt- one of the CCITT type constants
-