From 2c544f35c8bcd7bdd7c8d79d691c10d42b0ca31b Mon Sep 17 00:00:00 2001 From: prettysunflower Date: Sun, 18 May 2025 18:28:48 +0200 Subject: [PATCH] Made HQ images black bar removal a bit better --- main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 56e03aa..a9f623b 100644 --- a/main.go +++ b/main.go @@ -68,7 +68,9 @@ func getYouTubeThumbnail(writer http.ResponseWriter, request *http.Request) { fmt.Println("Youtube thumbnail horizontal") fmt.Println("Ideal size") fmt.Print(imageHq.Bounds().Max.X, ", ") - idealHeight := imageMqBounds.Max.Y * 100 / (imageMqBounds.Max.X * 100 / imageHqBounds.Max.X) + idealHeight := imageMqBounds.Max.Y * 100 / + (imageMqBounds.Max.X * 100 / imageHqBounds.Max.X) + idealHeight -= 4 fmt.Println(idealHeight) newImage := image.NewRGBA64(image.Rectangle{