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

FileFormatWriter() public method

The constructor of the FileFormatWriter. It receives all the information necessary about a codestream to generate a legal JP2 file
public FileFormatWriter ( Stream stream, int height, int width, int nc, int bpc, int clength ) : System
stream Stream The stream that is to be made a JP2 file /// ///
height int The height of the image /// ///
width int The width of the image /// ///
nc int The number of components /// ///
bpc int The number of bits per component /// ///
clength int Length of codestream /// ///
return System
        public FileFormatWriter(Stream stream, int height, int width, int nc, int[] bpc, int clength)
        {
            this.height = height;
            this.width = width;
            this.nc = nc;
            this.bpc = bpc;
            this.stream = stream;
            this.clength = clength;

            bpcVaries = false;
            int fixbpc = bpc[0];
            for (int i = nc - 1; i > 0; i--)
            {
                if (bpc[i] != fixbpc)
                    bpcVaries = true;
            }
        }