Exemplo n.º 1
0
        public UnsafeBitmap Transpose()
        {
            UnsafeBitmap result = new UnsafeBitmap(bitmapHeight, bitmapWidth);

            result.LockBitmap();
            for (int i = 0; i < bitmapWidth; i++)
            {
                for (int j = 0; j < bitmapHeight; j++)
                {
                    result.SetPixel(j, i, GetPixel(i, j));
                }
            }
            return(result);
        }
Exemplo n.º 2
0
        public UnsafeBitmap Lighter()
        {
            UnsafeBitmap result = new UnsafeBitmap(bitmapWidth, bitmapHeight);

            result.LockBitmap();
            for (int i = 0; i < bitmapWidth; i++)
            {
                for (int j = 0; j < bitmapHeight; j++)
                {
                    PixelData p = GetPixel(i, j);
                    result.SetPixel(i, j,
                                    Color.FromArgb(Math.Min(255, p.red + 20), Math.Min(255, p.green + 20), Math.Min(255, p.blue + 20)));
                }
            }
            return(result);
        }