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

            if (bitmap != null)
            {
                return(await bitmap.AsJpegBytesAsync(args.Quality));
            }
            return(null);
        }