ChromiumWebBrowserCaptureScreenshotAsync Method |
Version 130.1.90
Capture page screenshot.
Namespace: CefSharp.OffScreenAssembly: CefSharp.OffScreen (in CefSharp.OffScreen.dll) Version: 129.0.110.0 (129.0.110.0)
Syntax public Task<byte[]> CaptureScreenshotAsync(
CaptureScreenshotFormat? format = null,
int? quality = null,
Viewport viewport = null
)
public:
Task<array<unsigned char>^>^ CaptureScreenshotAsync(
Nullable<CaptureScreenshotFormat> format = nullptr,
Nullable<int> quality = nullptr,
Viewport^ viewport = nullptr
)
Parameters
- format NullableCaptureScreenshotFormat (Optional)
- Image compression format (defaults to png).
- quality NullableInt32 (Optional)
- Compression quality from range [0..100] (jpeg only).
- viewport Viewport (Optional)
- view port to capture, if not null the browser will be resized if the requested width/height
are larger than the current browser Size.
Return Value
TaskByteA task that can be awaited to obtain the screenshot as a byte[].
See Also