Exemple #1
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            Bitmap RawIMG;

            ImageDataProcessor imgp = new ImageDataProcessor();


            Int32[,] _imagearray = imgp.ReadRaw("C:\\temp\\IMG_2s_100iso_0C_2020-06-14--01-01-33.NEF");

            var buffer = new byte[_imagearray.GetLength(0) * _imagearray.GetLength(1) * System.Runtime.InteropServices.Marshal.SizeOf(typeof(Int16))];

            Buffer.BlockCopy(_imagearray, 0, buffer, 0, buffer.Length);

            var flatarray = FlipAndConvert2d(_imagearray);


            byte[] flatarraybyte = new byte[flatarray.Length * 2];
            Buffer.BlockCopy(flatarray, 0, flatarraybyte, 0, flatarray.Length * 2);



            RawIMG = Contrast(ColorBalance(createImage(_imagearray), 50, 50, 50), 15);



            RawIMG.Save("C:\\temp\\test.png");

            pictTestfrm.Image = RawIMG;
        }
Exemple #2
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            Bitmap RawIMG;

            ImageDataProcessor imgp = new ImageDataProcessor();

            //Bitmap Test = new Bitmap("C:\\temp\\allskynikon.jpg");

            Int32[,] _imagearray = imgp.ReadRaw("C:\\temp\\canon2.CR2");

            //RawIMG = Contrast(ColorBalance(createImage(_imagearray), 50, 50, 50), 15);
            //RawIMG = createImage(_imagearray);

            RawIMG = createImage(_imagearray);

            RawIMG.Save("C:\\temp\\test.png");

            pictTestfrm.Image = RawIMG;
        }