Ejemplo n.º 1
0
        private async Task <byte[]> GetImageAsPngAsync(GetImageAsPngArgs args)
        {
            System.Windows.Media.ImageSource source = Control.Source;
            WriteableBitmap bitmap = source as WriteableBitmap;

            if (bitmap != null)
            {
                return(await bitmap.AsPngBytesAsync());
            }
            return(null);
        }