37 lines
696 B
Go
37 lines
696 B
Go
|
// Package collage makes a pic collage
|
||
|
package collage
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
"io/fs"
|
||
|
)
|
||
|
|
||
|
type Dimension struct {
|
||
|
Width uint `json:"width"`
|
||
|
Height uint `json:"height"`
|
||
|
}
|
||
|
|
||
|
type Point struct {
|
||
|
X uint `json:"x"`
|
||
|
Y uint `json:"y"`
|
||
|
}
|
||
|
|
||
|
type Rectangle struct {
|
||
|
Start Point `json:"start"`
|
||
|
End Point `json:"end"`
|
||
|
}
|
||
|
|
||
|
type Request struct {
|
||
|
BackgroundImage string `json:"background_image"`
|
||
|
Aspect Dimension `json:"aspect"`
|
||
|
Dimension Dimension `json:"dimension"`
|
||
|
Photos []struct {
|
||
|
ImageName string `json:"image"`
|
||
|
Crop Rectangle `json:"crop"`
|
||
|
Frame Rectangle `json:"frame"`
|
||
|
} `json:"photos"`
|
||
|
}
|
||
|
|
||
|
func Make(request Request, source fs.FS, output io.Writer) {
|
||
|
}
|