Exemple #1
0
        /*
         *
         * public ColorFilterArray(uint filters)
         * {
         *  Size = new Point2D(8, 2);
         *  cfa = null;
         *  SetSize(Size);
         *
         *  for (uint x = 0; x < 8; x++)
         *  {
         *      for (uint y = 0; y < 2; y++)
         *      {
         *          CFAColor c = (CFAColor)FC(filters, y, x);
         *          SetColorAt(new Point2D(x, y), c);
         *      }
         *  }
         * }
         *
         * // FC macro from dcraw outputs, given the filters definition, the dcraw color
         * // number for that given position in the CFA pattern
         * protected static uint FC(uint filters, uint row, uint col)
         * {
         *  return ((filters) >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3);
         * }*/

        public ColorFilterArray Equal(ColorFilterArray other)
        {
            SetSize(other.Size);
            if (cfa != null)
            {
                Common.Memcopy(cfa, other.cfa, Size.Area * sizeof(CFAColor));
            }
            return(this);
        }
Exemple #2
0
 public ColorFilterArray(ColorFilterArray other)
 {
     cfa = null;
     SetSize(other.Size);
     if (cfa != null)
     {
         Common.Memcopy(cfa, other.cfa, Size.Area);
     }
 }