From 94d0e0d12846aa85fbf119a8a6976ca3d9ffd35f Mon Sep 17 00:00:00 2001 From: Antoni Sawicki Date: Tue, 2 Jul 2024 01:23:14 -0700 Subject: [PATCH] add comments todo --- txt.go | 2 +- wrp.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/txt.go b/txt.go index 807adc6..d3b3e19 100644 --- a/txt.go +++ b/txt.go @@ -197,7 +197,7 @@ func smallGif(src []byte) ([]byte, error) { if err != nil { return nil, fmt.Errorf("image decode problem: %v", err) } - if img.Bounds().Max.X-img.Bounds().Min.X > *txtImgSize { + if img.Bounds().Max.X-img.Bounds().Min.X > *txtImgSize { // this should come from the form img = resize.Resize(uint(*txtImgSize), 0, img, resize.NearestNeighbor) } var gifBuf bytes.Buffer diff --git a/wrp.go b/wrp.go index de37ecd..450a800 100644 --- a/wrp.go +++ b/wrp.go @@ -51,7 +51,7 @@ var ( headless = flag.Bool("h", true, "Headless mode / hide browser window (default true)") noDel = flag.Bool("n", false, "Do not free maps and images after use") defType = flag.String("t", "gif", "Image type: png|gif|jpg|txt") - txtImgSize = flag.Int("ts", 200, "txt mode image size") + txtImgSize = flag.Int("ts", 200, "txt mode image size") // make it default, this should come from the from jpgQual = flag.Int("q", 80, "Jpeg image quality, default 80%") fgeom = flag.String("g", "1152x600x216", "Geometry: width x height x colors, height can be 0 for unlimited") htmFnam = flag.String("ui", "wrp.html", "HTML template file for the UI")