feat: enhance HTML report with modals for summary JSON and log content, and improve download functionality

This commit is contained in:
lilong.129
2025-06-25 14:48:57 +08:00
parent bfa6a0e4cd
commit 9b9875dc2c
3 changed files with 150 additions and 20 deletions

View File

@@ -424,6 +424,9 @@ func resizeImage(src image.Image, width, height int) image.Image {
// CompressImageFile compresses an image file and returns the compressed data
func CompressImageFile(imagePath string, enableResize bool, maxWidth int) ([]byte, error) {
log.Debug().Str("imagePath", imagePath).Bool("enableResize", enableResize).
Int("maxWidth", maxWidth).Msg("compress image file")
// Read the original image file
file, err := os.Open(imagePath)
if err != nil {