Ejemplo n.º 1
0
        public static WriteableBitmap Clone(this WriteableBitmap bitmap)
        {
            var result = new WriteableBitmap(bitmap.PixelWidth, bitmap.PixelHeight, bitmap.DpiX, bitmap.DpiY, bitmap.Format, null);
            var colors = bitmap.Colors();

            result.ForEach((x, y, color) => colors.GetValue(y.UInt32(), x.UInt32()));
            return(result);
        }