diff --git a/cmd/wallart-server/main.go b/cmd/wallart-server/main.go index b6e30d8..19315f3 100644 --- a/cmd/wallart-server/main.go +++ b/cmd/wallart-server/main.go @@ -77,6 +77,11 @@ func handleUpload(w http.ResponseWriter, r *http.Request) { return } + if img.Bounds().Max.X != 8 || img.Bounds().Max.Y != 8 { + http.Error(w, "Invalid frame size", http.StatusBadRequest) + return + } + // Dump it to the raw file for y := 0; y < 8; y++ { for x := 0; x < 8; x++ {