ChromiumWebBrowserCaptureScreenshotAsync Method |
Version 101.0.180
Capture page screenshot.
Namespace:
CefSharp.OffScreen
Assembly:
CefSharp.OffScreen (in CefSharp.OffScreen.dll) Version: 101.0.180.0 (101.0.180.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 if the requested width/height
are larger than the current browser Size.
Return Value
Type:
TaskByteA task that can be awaited to obtain the screenshot as a byte[].
See Also