Beispiel #1
0
 //Constructor
 public PixelFormatComponent()
 {
     unchecked {
         type           = (PixelComponent)0;
         convention     = (PixelRepresentation)0;
         bitsPerChannel = (byte)0;
         isSigned       = false;
     }
 }
Beispiel #2
0
        static int GetPixelComponent(int pixel, PixelComponent component)
        {
            switch (component)
            {
            case PixelComponent.Red: return((pixel >> 16) & 0xff);

            case PixelComponent.Green: return((pixel >> 8) & 0xff);

            case PixelComponent.Blue: return(pixel & 0xff);
            }

            throw new Exception("Invalid component");
        }