mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-12 02:21:29 +08:00
fix: jpeg options in save screenshot
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user