From f6bd3419c0ae062fe9297f8c7a19036cea4951d1 Mon Sep 17 00:00:00 2001 From: "huangbin.beal@163.com" Date: Mon, 1 Apr 2024 16:49:16 +0800 Subject: [PATCH] fix: jpeg options in save screenshot --- hrp/pkg/uixt/ext.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hrp/pkg/uixt/ext.go b/hrp/pkg/uixt/ext.go index 4fac1419..f283c7f9 100644 --- a/hrp/pkg/uixt/ext.go +++ b/hrp/pkg/uixt/ext.go @@ -276,7 +276,7 @@ func (dExt *DriverExt) saveScreenShot(raw *bytes.Buffer, fileName string) (strin switch format { // Convert to jpeg uniformly and compress with a compression rate of 95 case "jpeg", "png": - jpegOptions := &jpeg.Options{Quality: 95} + jpegOptions := &jpeg.Options{} err = jpeg.Encode(file, img, jpegOptions) default: return "", fmt.Errorf("unsupported image format: %s", format)