VisualDiagnostics.CaptureAsJpegAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CaptureAsJpegAsync(IView, Int32) |
Captures the given view as a JPEG image asynchronously with specified quality. |
CaptureAsJpegAsync(IWindow, Int32) |
Captures the given window as a JPEG image asynchronously with specified quality. |
CaptureAsJpegAsync(IView, Int32)
- Source:
- VisualDiagnostics.cs
- Source:
- VisualDiagnostics.cs
- Source:
- VisualDiagnostics.cs
Captures the given view as a JPEG image asynchronously with specified quality.
public static System.Threading.Tasks.Task<byte[]?> CaptureAsJpegAsync(Microsoft.Maui.IView view, int quality = 80);
static member CaptureAsJpegAsync : Microsoft.Maui.IView * int -> System.Threading.Tasks.Task<byte[]>
Public Shared Function CaptureAsJpegAsync (view As IView, Optional quality As Integer = 80) As Task(Of Byte())
Parameters
- view
- IView
The view to capture.
- quality
- Int32
The JPEG quality (0-100).
Returns
A byte array containing the JPEG image, or null if capture failed.
Applies to
CaptureAsJpegAsync(IWindow, Int32)
- Source:
- VisualDiagnostics.cs
- Source:
- VisualDiagnostics.cs
- Source:
- VisualDiagnostics.cs
Captures the given window as a JPEG image asynchronously with specified quality.
public static System.Threading.Tasks.Task<byte[]?> CaptureAsJpegAsync(Microsoft.Maui.IWindow window, int quality = 80);
static member CaptureAsJpegAsync : Microsoft.Maui.IWindow * int -> System.Threading.Tasks.Task<byte[]>
Public Shared Function CaptureAsJpegAsync (window As IWindow, Optional quality As Integer = 80) As Task(Of Byte())
Parameters
- window
- IWindow
The window to capture.
- quality
- Int32
The JPEG quality (0-100).
Returns
A byte array containing the JPEG image, or null if capture failed.