示例#1
0
        public static void njDone()
        {
            int i;

            for (i = 0; i < 3; ++i)
            {
                if (nj.comp[i].pixels != null)
                {
                    nj.comp[i].pixels = null;//???????
                    //njFreeMem((void*)nj.comp[i].pixels);
                }
            }
            if (nj.rgb != null)
            {
                nj.rgb = null;
                //njFreeMem((object)nj.rgb);
            }
            nj = new _nj_ctx();
        }
示例#2
0
        static void Main(string[] args)
        {
            int size;

            byte[]     buffer;
            FileStream fileStream;


            using (fileStream = File.OpenRead(args[0]))
            {
                var fileSize = fileStream.Length;
                buffer = new byte[fileSize];

                fileStream.Read(buffer, 0, Convert.ToInt32(fileSize));
            }

            nj = new _nj_ctx();        //njInit();
            if (njDecode(buffer, buffer.Length) != 0)
            {
                Console.WriteLine("Error decoding the input file.\n");
                return;
            }
        }