Class ImageContent
java.lang.Object
org.apache.fop.afp.modca.AbstractAFPObject
org.apache.fop.afp.modca.AbstractStructuredObject
org.apache.fop.afp.ioca.ImageContent
- All Implemented Interfaces:
Streamable
An IOCA Image Content
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final byteThe CCITT T.4 Group 3 Coding Standard (G3 MH-Modified Huffman) is a compression method standardized by the International Telegraph and Telephone Consultative Committee (CCITT) for facsimile.static final byteThe CCITT T.6 Group 4 Coding Standard (G4 MMR-Modified Modified READ) is a compression method standardized by the International Telegraph and Telephone Consultative Committee (CCITT) for facsimile.static final byteThe CCITT T.4 Group 3 Coding Option (G3 MR-Modified READ) is a compression method standardized by the International Telegraph and Telephone Consultative Committee (CCITT) for facsimile.static final byteJPEG algorithms (usually baseline DCT).private bytethe image compressionprivate byte[]the image dataprivate bytethe image encodingprivate bytethe image IDE (Image Data Element, Sample) sizeprivate IDEStructureParameterthe IDE Structure parameterprivate ImageSizeParameterthe image size parameterprivate static final intprivate Tileprivate TileTOCFields inherited from class AbstractAFPObject
LOG, SF_CLASS, SF_HEADER_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate byte[]Helper method to return the external algorithm parameter.Returns the (optional) IDE Structure parameterprivate byte[]Helper method to return the image encoding parameter.private byte[]Helper method to return the image encoding parameter.Returns the (optional) IDE Structure parameter.voidsetIDEStructureParameter(IDEStructureParameter parameter) Sets the IDE Structure parameter.voidsetImageCompression(byte comp) Sets the image compression.voidsetImageData(byte[] imageData) Set the image data (can be byte array or inputstream)voidsetImageEncoding(byte enc) Sets the image encoding.voidsetImageIDEColorModel(byte color) Deprecated.voidsetImageIDESize(byte s) Sets the image IDE size.voidsetImageSizeParameter(ImageSizeParameter imageSizeParameter) Sets the image size parametervoidsetSubtractive(boolean subtractive) Deprecated.usesetIDEStructureParameter(IDEStructureParameter)insteadvoidsetTileTOC(TileTOC toc) voidsetTransparencyMask(byte[] transparencyMask) protected voidHelper method to write the contents of the Object.protected voidwriteEnd(OutputStream os) Helper method to write the end of the Object.protected voidHelper method to write the start of the Object.Methods inherited from class AbstractStructuredObject
writeToStreamMethods inherited from class AbstractAFPObject
copySF, copySF, truncate, writeChunksToStream, writeObjects
-
Field Details
-
COMPID_G3_MH
public static final byte COMPID_G3_MHThe CCITT T.4 Group 3 Coding Standard (G3 MH-Modified Huffman) is a compression method standardized by the International Telegraph and Telephone Consultative Committee (CCITT) for facsimile. It enables one-dimensional compression.- See Also:
-
COMPID_G3_MR
public static final byte COMPID_G3_MRThe CCITT T.4 Group 3 Coding Option (G3 MR-Modified READ) is a compression method standardized by the International Telegraph and Telephone Consultative Committee (CCITT) for facsimile. It enables two-dimensional compression.- See Also:
-
COMPID_G3_MMR
public static final byte COMPID_G3_MMRThe CCITT T.6 Group 4 Coding Standard (G4 MMR-Modified Modified READ) is a compression method standardized by the International Telegraph and Telephone Consultative Committee (CCITT) for facsimile. It enables two-dimensional compression.- See Also:
-
COMPID_JPEG
public static final byte COMPID_JPEGJPEG algorithms (usually baseline DCT).- See Also:
-
imageSizeParameter
the image size parameter -
ideStructureParameter
the IDE Structure parameter -
encoding
private byte encodingthe image encoding -
ideSize
private byte ideSizethe image IDE (Image Data Element, Sample) size -
compression
private byte compressionthe image compression -
data
private byte[] datathe image data -
tileTOC
-
tile
-
MAX_DATA_LEN
private static final int MAX_DATA_LEN- See Also:
-
-
Constructor Details
-
ImageContent
public ImageContent()Main Constructor
-
-
Method Details
-
setImageSizeParameter
Sets the image size parameter- Parameters:
imageSizeParameter- the image size parameter.
-
setIDEStructureParameter
Sets the IDE Structure parameter.- Parameters:
parameter- the IDE Structure parameter
-
getIDEStructureParameter
Returns the (optional) IDE Structure parameter- Returns:
- the IDE Structure parameter or null if none is set
-
needIDEStructureParameter
Returns the (optional) IDE Structure parameter. If none is set an instance is prepared with defaults for a bi-level image.- Returns:
- the IDE Structure parameter
-
setImageEncoding
public void setImageEncoding(byte enc) Sets the image encoding.- Parameters:
enc- The image encoding.
-
setImageCompression
public void setImageCompression(byte comp) Sets the image compression.- Parameters:
comp- The image compression.
-
setImageIDESize
public void setImageIDESize(byte s) Sets the image IDE size.- Parameters:
s- The IDE size.
-
setImageIDEColorModel
Deprecated.usesetIDEStructureParameter(IDEStructureParameter)insteadSets the image IDE color model.- Parameters:
color- the IDE color model.
-
setSubtractive
Deprecated.usesetIDEStructureParameter(IDEStructureParameter)insteadSet either additive or subtractive mode (used for ASFLAG).- Parameters:
subtractive- true for subtractive mode, false for additive mode
-
setImageData
public void setImageData(byte[] imageData) Set the image data (can be byte array or inputstream)- Parameters:
imageData- the image data
-
setTransparencyMask
public void setTransparencyMask(byte[] transparencyMask) -
writeContent
Helper method to write the contents of the Object.- Overrides:
writeContentin classAbstractStructuredObject- Parameters:
os- The stream to write to- Throws:
IOException- throws an I/O exception if one occurred
-
writeStart
Helper method to write the start of the Object.- Overrides:
writeStartin classAbstractStructuredObject- Parameters:
os- The stream to write to- Throws:
IOException- throws an I/O exception if one occurred
-
writeEnd
Helper method to write the end of the Object.- Overrides:
writeEndin classAbstractStructuredObject- Parameters:
os- The stream to write to- Throws:
IOException- an I/O exception if one occurred
-
getImageEncodingParameter
private byte[] getImageEncodingParameter()Helper method to return the image encoding parameter.- Returns:
- byte[] The data stream.
-
getExternalAlgorithmParameter
private byte[] getExternalAlgorithmParameter()Helper method to return the external algorithm parameter.- Returns:
- byte[] The data stream.
-
getImageIDESizeParameter
private byte[] getImageIDESizeParameter()Helper method to return the image encoding parameter.- Returns:
- byte[] The data stream.
-
setTileTOC
-
addTile
-
setIDEStructureParameter(IDEStructureParameter)instead