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); }
private Task <byte[]> GetImageAsPngAsync(GetImageAsPngArgs args) { return(GetImageAsByteAsync(BitmapEncoder.PngEncoderId, 90, args.DesiredWidth, args.DesiredHeight)); }
Task <byte[]> GetImageAsPngAsync(GetImageAsPngArgs args) { return(Control.GetImageData(true, 100)); }
private Task <byte[]> GetImageAsPngAsync(GetImageAsPngArgs args) { return(GetImageAsByteAsync(Bitmap.CompressFormat.Png, 90, args.DesiredWidth, args.DesiredHeight)); }
Task <byte[]> GetImageAsPngAsync(GetImageAsPngArgs args) { return(GetImageAsByteAsync(true, 90, args.DesiredWidth, args.DesiredHeight)); }