Use async overloads

This commit is contained in:
smoogipoo 2020-12-03 18:04:53 +09:00
parent 78c43641d1
commit 62b1e37f73
1 changed files with 2 additions and 2 deletions

View File

@ -116,13 +116,13 @@ public Task TakeScreenshotAsync() => Task.Run(async () =>
switch (screenshotFormat.Value)
{
case ScreenshotFormat.Png:
image.SaveAsPng(stream);
await image.SaveAsPngAsync(stream);
break;
case ScreenshotFormat.Jpg:
const int jpeg_quality = 92;
image.SaveAsJpeg(stream, new JpegEncoder { Quality = jpeg_quality });
await image.SaveAsJpegAsync(stream, new JpegEncoder { Quality = jpeg_quality });
break;
default: