diff --git a/cmd/run.go b/cmd/run.go deleted file mode 100644 index cbe73d5..0000000 --- a/cmd/run.go +++ /dev/null @@ -1,56 +0,0 @@ -package main - -import ( - "encoding/json" - "fmt" - "os" - - "go.balki.me/collage-maker/collage" -) - -func main() { - req := collage.Request{} - /* - reqStr := []byte(` - { - "background_image": "", - "aspect": { "width": 4224, "height": 3264 }, - "dimension": { "width": 1187, "height": 848 }, - "photos": [ - { - "image": "img1.jpg", - "crop": { - "start": { "x": 419, "y": 667 }, - "end": { "x": 2707, "y": 3389 } - }, - "frame": { - "start": { "x": 0, "y": 0 }, - "end": { "x": 712, "y": 848 } - } - }, - { - "image": "img2.jpg", - "crop": { - "start": { "x": 331, "y": 44 }, - "end": { "x": 1132, "y": 1468 } - }, - "frame": { - "start": { "x": 712, "y": 0 }, - "end": { "x": 1187, "y": 848 } - } - } - ] - } - `) - */ - // {"background_image":"","aspect":{"width":4224,"height":3264},"dimension":{"width":1187,"height":848},"photos":[{"image":"img1.jpg","crop":{"start":{"x":528,"y":3},"end":{"x":2696,"y":2583}},"frame":{"start":{"x":0,"y":0},"end":{"x":712,"y":848}}},{"image":"img2.jpg","crop":{"start":{"x":410,"y":0},"end":{"x":1014,"y":1074}},"frame":{"start":{"x":712,"y":0},"end":{"x":1187,"y":848}}}]} - reqStr := []byte(` -{"background_image":"","aspect":{"width":4224,"height":3264},"dimension":{"width":1097,"height":848},"photos":[{"image":"img1.jpg","crop":{"start":{"x":448,"y":595},"end":{"x":2721,"y":3560}},"frame":{"start":{"x":0,"y":0},"end":{"x":649,"y":848}}},{"image":"img2.jpg","crop":{"start":{"x":418,"y":1},"end":{"x":1022,"y":1180}},"frame":{"start":{"x":665,"y":0},"end":{"x":1098,"y":848}}}]} -`) - err := json.Unmarshal(reqStr, &req) - fmt.Println(err) - out, err := os.Create("./collage.jpg") - fmt.Println(err) - err = collage.Make(&req, os.DirFS("."), out) - fmt.Println(err) -} diff --git a/dummy.txt b/dummy.txt deleted file mode 100644 index 3b18e51..0000000 --- a/dummy.txt +++ /dev/null @@ -1 +0,0 @@ -hello world diff --git a/standard.go b/standard.go deleted file mode 100644 index 59b46f6..0000000 --- a/standard.go +++ /dev/null @@ -1,24 +0,0 @@ -package main - -type Resolution struct { - X uint - Y uint -} - -// increased by factor 1.5 -// https://www.adorama.com/alc/pixels-and-printing-size-matters/ - -var Letter = Resolution{ - X: 3264, - Y: 4224, -} - -var FiveXSeven = Resolution{ - X: 2250, - Y: 3150, -} - -var FourXSix = Resolution{ - X: 1800, - Y: 2700, -} diff --git a/template.html b/template.html deleted file mode 100644 index cfca2b1..0000000 --- a/template.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - -
-
-
-
- -