public class FileFormatWriter extends Object implements FileFormatBoxes
FileFormatReaderBITS_PER_COMPONENT_BOX, CAPTURE_RESOLUTION_BOX, CHANNEL_DEFINITION_BOX, COLOUR_SPECIFICATION_BOX, COMPONENT_MAPPING_BOX, CONTIGUOUS_CODESTREAM_BOX, CSB_APPROX, CSB_ENUM_GREY, CSB_ENUM_SRGB, CSB_METH, CSB_PREC, DEFAULT_DISPLAY_RESOLUTION_BOX, FILE_TYPE_BOX, FT_BR, IMAGE_HEADER_BOX, IMB_C, IMB_IPR, IMB_UnkC, IMB_VERS, INTELLECTUAL_PROPERTY_BOX, JP2_HEADER_BOX, JP2_SIGNATURE_BOX, PALETTE_BOX, RESOLUTION_BOX, URL_BOX, UUID_BOX, UUID_INFO_BOX, UUID_LIST_BOX, XML_BOX| Constructor and Description |
|---|
FileFormatWriter(String filename,
int height,
int width,
int nc,
int[] bpc,
int clength)
The constructor of the FileFormatWriter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
writeBitsPerComponentBox()
This method writes the Bits Per Component box
|
void |
writeColourSpecificationBox()
This method writes the Colour Specification box
|
void |
writeContiguousCodeStreamBox(byte[] cs)
This method writes the Contiguous codestream box
|
int |
writeFileFormat()
This method reads the codestream and writes the file format wrapper and
the codestream to the same file
|
void |
writeFileTypeBox()
This method writes the File Type box
|
void |
writeImageHeaderBox()
This method writes the Image Header box
|
void |
writeJP2HeaderBox()
This method writes the JP2Header box
|
public FileFormatWriter(String filename, int height, int width, int nc, int[] bpc, int clength)
filename - The name of the file that is to be made a JP2 fileheight - The height of the imagewidth - The width of the imagenc - The number of componentsbpc - The number of bits per componentclength - Length of codestreampublic int writeFileFormat()
throws IOException
IOException - If an I/O error occurred.public void writeFileTypeBox()
throws IOException
IOException - If an I/O error occurred.public void writeJP2HeaderBox()
throws IOException
IOException - If an I/O error occurred.public void writeBitsPerComponentBox()
throws IOException
IOException - If an I/O error occurred.public void writeColourSpecificationBox()
throws IOException
IOException - If an I/O error occurred.public void writeImageHeaderBox()
throws IOException
IOException - If an I/O error occurred.public void writeContiguousCodeStreamBox(byte[] cs)
throws IOException
cs - The contiguous codestreamIOException - If an I/O error occurred.Copyright © 2015. All rights reserved.