This commit is contained in:
2026-06-21 01:18:50 +03:00
parent afd438930e
commit 3b32bfa85f
20 changed files with 70 additions and 73 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
package main
import (
"net/http"
"log"
"net/http"
)
type imageTransform struct {
@@ -29,14 +29,14 @@ func indexHTML(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusInternalServerError)
log.Println("copy error:", err)
return
}
}
}
func main() {
http.HandleFunc("/", indexHTML)
http.Handle("POST /upload", imageTransform)
err := http.ListenAndServe(":8080", nil)
err := http.ListenAndServe(":8080", nil)
if err != nil {
log.Panicln(err)
}
+3 -3
View File
@@ -5,13 +5,13 @@
package main
import (
"git.nkpl.cc/twocookedfaggots/imageutils"
"git.nkpl.cc/twocookedfaggots/imageutils/http/blank"
"image"
"image/color"
"image/png"
"image/jpeg"
"image/png"
"os"
"git.nkpl.cc/twocookedfaggots/imageutils"
"git.nkpl.cc/twocookedfaggots/imageutils/http/blank"
)
func BlankFillWhite(img image.Image) image.Image {