Exemplo n.º 1
0
 public Cjpeg(string path)
 {
     br = new BinaryReader(File.Open(path, FileMode.Open));
     read_file();
     cb = new CBlock(sof.width / 8, sof.height / 8);
     br.Close();
 }
Exemplo n.º 2
0
 public Cjpeg(Cjpeg prev)
 {
     app0 = new APP0(prev.app0);
     dqt = new DQT(prev.dqt);
     dht = new DHT(prev.dht);
     sof = new SOF0(prev.sof);
     sos = new SOS(prev.sos);
     cb = new CBlock(prev.cb);
 }
Exemplo n.º 3
0
        public CBlock(CBlock prev)
        {
            block_width = prev.block_width;
            block_height = prev.block_height;
            b_len = prev.b_len;

            data = new int[prev.data.Length][][];
            for (int i = 0; i < 3; i++)
            {
                data[i] = new int[prev.data[i].Length][];
                for (int j = 0; j < prev.data[i].Length; j++)
                {
                    data[i][j] = new int[prev.data[i][j].Length];
                    prev.data[i][j].CopyTo(data[i][j], 0);
                }
            }
        }