Made HQ images black bar removal a bit better
All checks were successful
Build Docker images / acls (push) Successful in 1m23s

This commit is contained in:
2025-05-18 18:28:48 +02:00
parent b30f6b8217
commit 2c544f35c8

View File

@@ -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{