Exemple #1
0
        // Extra pish
        public static Bitmap ChangeColorBitLock(Bitmap scrBitmap)
        {
            Color newColor = Color.FromArgb(16, 8, 8);

            LockBitmap lockBitmap = new LockBitmap(scrBitmap);

            lockBitmap.LockBits();

            for (int i = 0; i < lockBitmap.Width; i++)
            {
                for (int j = 0; j < lockBitmap.Height; j++)
                {
                    if (lockBitmap.GetPixel(i, j) != Color.FromArgb(0, 0, 0)) //8 12 8
                    {
                        lockBitmap.SetPixel(i, j, newColor);
                    }
                }
            }
            lockBitmap.UnlockBits();
            return(scrBitmap);
        }
Exemple #2
0
        public static Bitmap MirStyleTransparentBitLock(Bitmap bmp)
        {
            LockBitmap lockBitmap = new LockBitmap(bmp);

            lockBitmap.LockBits();

            for (int i = 0; i < lockBitmap.Width - 1; i++)
            {
                for (int j = 0; j < lockBitmap.Height - 1; j++)
                {
                    if (IsOdd(i) & IsOdd(j))
                    {
                        lockBitmap.SetPixel(i, j, Color.Black);
                    }
                    else if (!IsOdd(i) & !IsOdd(j))
                    {
                        lockBitmap.SetPixel(i, j, Color.Black);
                    }
                }
            }
            lockBitmap.UnlockBits();
            return(bmp);
        }