ChromiumWebBrowserCaptureScreenshotAsync Method |
Version 96.0.142
Capture page screenshot.
Namespace:
CefSharp.OffScreen
Assembly:
CefSharp.OffScreen (in CefSharp.OffScreen.dll) Version: 96.0.142.0 (96.0.142.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 (Optional)
- Type: SystemNullableCaptureScreenshotFormat
Image compression format (defaults to png). - quality (Optional)
- Type: SystemNullableInt32
Compression quality from range [0..100] (jpeg only). - viewport (Optional)
- Type: CefSharp.DevTools.PageViewport
view port to capture, if not null the browser will be resized to match the width/height.
Return Value
Type:
TaskByteA task that can be awaited to obtain the screenshot as a byte[].
See Also