From 6c20cfe2b683cfb021b0f7e0fc091a497f520972 Mon Sep 17 00:00:00 2001 From: Martyn Date: Sun, 12 Dec 2021 12:11:42 +0100 Subject: [PATCH] Teeny cleanup --- examples/webcam/main.go | 1 + pkg/webcam/webcam.go | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/webcam/main.go b/examples/webcam/main.go index 9135600..d298989 100644 --- a/examples/webcam/main.go +++ b/examples/webcam/main.go @@ -40,6 +40,7 @@ func main() { layout := layouts.NewFloatingControlsLayout() layout.FloatingControlsLocation = layouts.FloatingControlsCenter webcamID = 0 + webcamWidget.UpdateFPS = 50 webcamLabel = widget.NewLabel("Webcam: 0") buttons := container.NewHBox(webcamLabel, widget.NewButton("-", decWebCamID), widget.NewButton("+", incWebCamID)) diff --git a/pkg/webcam/webcam.go b/pkg/webcam/webcam.go index b5870d9..cd11a1f 100644 --- a/pkg/webcam/webcam.go +++ b/pkg/webcam/webcam.go @@ -52,11 +52,6 @@ type webcamRenderer struct { goCVVideoCapture *gocv.VideoCapture } -func renderframe(w, h int) image.Image { - frameImage := image.NewRGBA(image.Rect(0, 0, w, h)) - return frameImage -} - func (r *webcamRenderer) actualrenderframe(w, h int) image.Image { webcam, _ := gocv.VideoCaptureDevice(int(r.webcam.WebcamID)) img := gocv.NewMat()