CSJ2K.j2k.fileformat.writer.FileFormatWriter.writeBitsPerComponentBox C# (CSharp) Method

writeBitsPerComponentBox() public method

This method writes the Bits Per Component box
If an I/O error ocurred. /// ///
public writeBitsPerComponentBox ( ) : void
return void
        public virtual void writeBitsPerComponentBox()
        {
            // Write box length (LBox)
            fi.writeInt(BPC_LENGTH + nc);

            // Write a Bits Per Component box (TBox)
            fi.writeInt(CSJ2K.j2k.fileformat.FileFormatBoxes.BITS_PER_COMPONENT_BOX);

            // Write bpc fields
            for (int i = 0; i < nc; i++)
            {
                fi.writeByte(bpc[i] - 1);
            }
        }