Merge pull request #9662 from Poliwrath/jpeg-quality

Increase screenshot quality when using JPEG setting
This commit is contained in:
Dean Herbert
2020-07-24 15:57:52 +09:00
committed by GitHub

View File

@ -19,6 +19,7 @@ using osu.Game.Input.Bindings;
using osu.Game.Overlays; using osu.Game.Overlays;
using osu.Game.Overlays.Notifications; using osu.Game.Overlays.Notifications;
using SixLabors.ImageSharp; using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Jpeg;
namespace osu.Game.Graphics namespace osu.Game.Graphics
{ {
@ -119,7 +120,9 @@ namespace osu.Game.Graphics
break; break;
case ScreenshotFormat.Jpg: case ScreenshotFormat.Jpg:
image.SaveAsJpeg(stream); const int jpeg_quality = 92;
image.SaveAsJpeg(stream, new JpegEncoder { Quality = jpeg_quality });
break; break;
default: default: