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); }
private Task <byte[]> GetImageAsJpgAsync(GetImageAsJpgArgs args) { return(GetImageAsByteAsync(BitmapEncoder.JpegEncoderId, args.Quality, args.DesiredWidth, args.DesiredHeight)); }
Task <byte[]> GetImageAsJpgAsync(GetImageAsJpgArgs args) { return(Control.GetImageData(false, args.Quality)); }
private Task <byte[]> GetImageAsJpgAsync(GetImageAsJpgArgs args) { return(GetImageAsByteAsync(Bitmap.CompressFormat.Jpeg, args.Quality, args.DesiredWidth, args.DesiredHeight)); }
Task <byte[]> GetImageAsJpgAsync(GetImageAsJpgArgs args) { return(GetImageAsByteAsync(false, args.Quality, args.DesiredWidth, args.DesiredHeight)); }