Beispiel #1
0
// UnParse the box out to the stream.
CNCSError CNCSJP2Box::UnParse(class CNCSJP2File &JP2File, CNCSJPCIOStream &Stream)
{
	CNCSError Error;

	// If length is > 2^32, need to write out the 64bit XLBox field.
	if(m_nXLBox > 0xffffffff) {
		// Will be writing XLBox, so write out 1 for the LBox field.
		Stream.WriteUINT32(1);
	} else {
		Stream.WriteUINT32((UINT32)m_nXLBox);
	}
	if(Stream.GetError() == NCS_SUCCESS) {
		// Write out the box type;
		if(Stream.WriteUINT32(m_nTBox) && m_nXLBox > 0xffffffff) {
			// Write out the XLBox field.
			Stream.WriteUINT64(m_nXLBox);
		}
		Error = Stream.GetError();
	}
	return(Error);
}