Skip to content
Permalink
Browse files

Provide default quality for jpeg screenshots (#922)

  • Loading branch information...
rgelb authored and kblok committed Feb 18, 2019
1 parent 3683608 commit 9b1a597d57ff1c20d2ccb850dc1451a8a23727b4
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/PuppeteerSharp/Page.cs
@@ -967,6 +967,11 @@ public async Task ScreenshotAsync(string file, ScreenshotOptions options)
if (!options.Type.HasValue)
{
options.Type = ScreenshotOptions.GetScreenshotTypeFromFile(file);

if (options.Type == ScreenshotType.Jpeg && !options.Quality.HasValue)
{
options.Quality = 90;
}
}
var data = await ScreenshotDataAsync(options).ConfigureAwait(false);

0 comments on commit 9b1a597

Please sign in to comment.
You can’t perform that action at this time.