Exemplo n.º 1
0
 public MainWindow()
 {
     InitializeComponent();
     this.cgd          = new ColorGridData((Int32)this.image.Width, (Int32)this.image.Height);
     this.wb           = new WriteableBitmap((Int32)this.image.Width, (Int32)this.image.Height, 92, 92, PixelFormats.Bgr32, null);
     this.image.Source = this.wb;
 }
 private void generate_hue_array(Byte[] color_array)
 {
     if (this.hue_array.LongLength * 4 != color_array.Length)
     {
         throw new ArgumentOutOfRangeException();
     }
     for (Int32 i = 0; i < this.hue_array.Length; ++i)
     {
         this.hue_array[i] = ColorGridData.calculate_hue(color_array[i * 4], color_array[i * 4 + 1], color_array[i * 4 + 2]);
     }
 }