コード例 #1
0
ファイル: Palette.cs プロジェクト: foobert/Colorduino
 public byte[] EncodeFrame(Frame frame)
 {
     byte[] encoded = new byte[64];
     int index = 0;
     foreach (var color in frame.AllPixels())
     {
         encoded[index++] = (byte)_colors.IndexOf(color);
     }
     return encoded;
 }
コード例 #2
0
ファイル: MutableFrame.cs プロジェクト: foobert/Colorduino
 public MutableFrame(Frame frame)
     : base(frame.Duration, frame.AllPixels().ToArray())
 {
 }