Package org.apache.fop.afp.ioca
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
public class ImageContent extends AbstractStructuredObject
An IOCA Image Content
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.fop.afp.modca.AbstractAFPObject
AbstractAFPObject.Category, AbstractAFPObject.Type
-
-
Field Summary
Fields Modifier and Type Field Description static byte
COMPID_G3_MH
The 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 byte
COMPID_G3_MMR
The 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 byte
COMPID_G3_MR
The 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 byte
COMPID_JPEG
JPEG algorithms (usually baseline DCT).private byte
compression
the image compressionprivate byte[]
data
the image dataprivate byte
encoding
the image encodingprivate byte
ideSize
the image IDE (Image Data Element, Sample) sizeprivate IDEStructureParameter
ideStructureParameter
the IDE Structure parameterprivate ImageSizeParameter
imageSizeParameter
the image size parameterprivate static int
MAX_DATA_LEN
private Tile
tile
private TileTOC
tileTOC
-
Fields inherited from class org.apache.fop.afp.modca.AbstractAFPObject
LOG, SF_CLASS, SF_HEADER_LENGTH
-
-
Constructor Summary
Constructors Constructor Description ImageContent()
Main Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addTile(Tile tile)
private byte[]
getExternalAlgorithmParameter()
Helper method to return the external algorithm parameter.IDEStructureParameter
getIDEStructureParameter()
Returns the (optional) IDE Structure parameterprivate byte[]
getImageEncodingParameter()
Helper method to return the image encoding parameter.private byte[]
getImageIDESizeParameter()
Helper method to return the image encoding parameter.IDEStructureParameter
needIDEStructureParameter()
Returns the (optional) IDE Structure parameter.void
setIDEStructureParameter(IDEStructureParameter parameter)
Sets the IDE Structure parameter.void
setImageCompression(byte comp)
Sets the image compression.void
setImageData(byte[] imageData)
Set the image data (can be byte array or inputstream)void
setImageEncoding(byte enc)
Sets the image encoding.void
setImageIDEColorModel(byte color)
Deprecated.usesetIDEStructureParameter(IDEStructureParameter)
insteadvoid
setImageIDESize(byte s)
Sets the image IDE size.void
setImageSizeParameter(ImageSizeParameter imageSizeParameter)
Sets the image size parametervoid
setSubtractive(boolean subtractive)
Deprecated.usesetIDEStructureParameter(IDEStructureParameter)
insteadvoid
setTileTOC(TileTOC toc)
void
setTransparencyMask(byte[] transparencyMask)
protected void
writeContent(java.io.OutputStream os)
Helper method to write the contents of the Object.protected void
writeEnd(java.io.OutputStream os)
Helper method to write the end of the Object.protected void
writeStart(java.io.OutputStream os)
Helper method to write the start of the Object.-
Methods inherited from class org.apache.fop.afp.modca.AbstractStructuredObject
writeToStream
-
Methods inherited from class org.apache.fop.afp.modca.AbstractAFPObject
copySF, copySF, truncate, writeChunksToStream, writeObjects
-
-
-
-
Field Detail
-
COMPID_G3_MH
public static final byte COMPID_G3_MH
The 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:
- Constant Field Values
-
COMPID_G3_MR
public static final byte COMPID_G3_MR
The 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:
- Constant Field Values
-
COMPID_G3_MMR
public static final byte COMPID_G3_MMR
The 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:
- Constant Field Values
-
COMPID_JPEG
public static final byte COMPID_JPEG
JPEG algorithms (usually baseline DCT).- See Also:
- Constant Field Values
-
imageSizeParameter
private ImageSizeParameter imageSizeParameter
the image size parameter
-
ideStructureParameter
private IDEStructureParameter ideStructureParameter
the IDE Structure parameter
-
encoding
private byte encoding
the image encoding
-
ideSize
private byte ideSize
the image IDE (Image Data Element, Sample) size
-
compression
private byte compression
the image compression
-
data
private byte[] data
the image data
-
tileTOC
private TileTOC tileTOC
-
tile
private Tile tile
-
MAX_DATA_LEN
private static final int MAX_DATA_LEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
setImageSizeParameter
public void setImageSizeParameter(ImageSizeParameter imageSizeParameter)
Sets the image size parameter- Parameters:
imageSizeParameter
- the image size parameter.
-
setIDEStructureParameter
public void setIDEStructureParameter(IDEStructureParameter parameter)
Sets the IDE Structure parameter.- Parameters:
parameter
- the IDE Structure parameter
-
getIDEStructureParameter
public IDEStructureParameter getIDEStructureParameter()
Returns the (optional) IDE Structure parameter- Returns:
- the IDE Structure parameter or null if none is set
-
needIDEStructureParameter
public IDEStructureParameter 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 public void setImageIDEColorModel(byte color)
Deprecated.usesetIDEStructureParameter(IDEStructureParameter)
insteadSets the image IDE color model.- Parameters:
color
- the IDE color model.
-
setSubtractive
@Deprecated public void setSubtractive(boolean subtractive)
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
protected void writeContent(java.io.OutputStream os) throws java.io.IOException
Helper method to write the contents of the Object.- Overrides:
writeContent
in classAbstractStructuredObject
- Parameters:
os
- The stream to write to- Throws:
java.io.IOException
- throws an I/O exception if one occurred
-
writeStart
protected void writeStart(java.io.OutputStream os) throws java.io.IOException
Helper method to write the start of the Object.- Overrides:
writeStart
in classAbstractStructuredObject
- Parameters:
os
- The stream to write to- Throws:
java.io.IOException
- throws an I/O exception if one occurred
-
writeEnd
protected void writeEnd(java.io.OutputStream os) throws java.io.IOException
Helper method to write the end of the Object.- Overrides:
writeEnd
in classAbstractStructuredObject
- Parameters:
os
- The stream to write to- Throws:
java.io.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
public void setTileTOC(TileTOC toc)
-
addTile
public void addTile(Tile tile)
-
-