Пример #1
0
 public void setbt(Bitmap input)
 {
     this.selectedimage = new bufferedLockBitmap(input);
     pictureBox1.Image = input;
     pictureBox2.Image = input;
     this.selectedimage.LockBits();
     this.selectedimage.UnlockBits();
     op = new Pixel_logic__Operations(selectedimage);
 }
Пример #2
0
        public Bitmap Read(String path)
        {
            String[] pa = path.Split('.');
            if (pa[pa.Length - 1] == "ppm" || pa[pa.Length - 1] == "PPM")
            {
                PP36File = new PP36FileReading(path);
                ImageBitmap = PP36File.ImageBitmap;
                ImageHigh = ImageBitmap.Height;
                ImageWidth = ImageBitmap.Width;
            }
            else
            {
                PP36File = new PP36FileReading();
                PP36File.readbitmap(path);
                ImageBitmap = PP36File.ImageBitmap;
                ImageHigh = ImageBitmap.Height;
                ImageWidth = ImageBitmap.Width;
            }

            ImageLockBitmap = new bufferedLockBitmap(ImageBitmap);
            ImageLockBitmap.LockBits();
            op = new Pixel_logic__Operations(this.ImageLockBitmap);
            return ImageLockBitmap.source;
        }