Ejemplo n.º 1
0
        public static int CalcLineSize(SmPixelTypes pt, int width)
        {
            switch (pt)
            {
            case SmPixelTypes.Bgr24: return(3 * width);

            case SmPixelTypes.Bgr32: return(4 * width);
            }

            throw new ArgumentException("Unknown pixeltype.");
        }
Ejemplo n.º 2
0
        public static int BytesPerPixel(SmPixelTypes pt)
        {
            switch (pt)
            {
            case SmPixelTypes.Bgr24: return(3);

            case SmPixelTypes.Bgr32: return(4);
            }

            throw new ArgumentException("Unknown pixeltype.");
        }