Esempio n. 1
0
        protected override VColor GetPixelInit(int col, int row)
        {
            SColor sc = bmp.GetPixel(col, row);

            double r = sc.R / 255.0;
            double g = sc.G / 255.0;
            double b = sc.B / 255.0;

            return(VColor.FromRGB(r, g, b));
        }
Esempio n. 2
0
        protected override void SetPixelInit(int col, int row, VColor vc)
        {
            byte r = (byte)Math.Floor((vc.Red * 255.0) + 0.5);
            byte g = (byte)Math.Floor((vc.Green * 255.0) + 0.5);
            byte b = (byte)Math.Floor((vc.Blue * 255.0) + 0.5);


            SColor sc = SColor.FromArgb(r, g, b);

            bmp.SetPixel(col, row, sc);
        }