2021-09-05 17:10:52 +02:00
|
|
|
package crop
|
|
|
|
|
|
|
|
import "github.com/photoprism/photoprism/internal/thumb"
|
|
|
|
|
|
|
|
var (
|
|
|
|
DefaultOptions = []thumb.ResampleOption{thumb.ResampleFillCenter, thumb.ResampleDefault}
|
|
|
|
)
|
|
|
|
|
|
|
|
type Size struct {
|
|
|
|
Name Name `json:"name"`
|
|
|
|
Source Name `json:"-"`
|
|
|
|
Use string `json:"use"`
|
|
|
|
Width int `json:"w"`
|
|
|
|
Height int `json:"h"`
|
|
|
|
Options []thumb.ResampleOption `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type SizeMap map[Name]Size
|
|
|
|
|
|
|
|
// Sizes contains the properties of all thumbnail sizes.
|
|
|
|
var Sizes = SizeMap{
|
2021-09-20 16:17:10 +02:00
|
|
|
Tile50: {Tile50, Tile320, "Lists", 50, 50, DefaultOptions},
|
|
|
|
Tile100: {Tile100, Tile320, "Maps", 100, 100, DefaultOptions},
|
2021-09-05 17:10:52 +02:00
|
|
|
Tile160: {Tile160, Tile320, "FaceNet", 160, 160, DefaultOptions},
|
2021-09-20 16:17:10 +02:00
|
|
|
Tile224: {Tile224, Tile320, "TensorFlow, Mosaic", 224, 224, DefaultOptions},
|
2021-09-05 17:10:52 +02:00
|
|
|
Tile320: {Tile320, "", "UI", 320, 320, DefaultOptions},
|
2021-09-20 16:17:10 +02:00
|
|
|
Tile500: {Tile500, "", "FaceNet", 500, 500, DefaultOptions},
|
2021-09-05 17:10:52 +02:00
|
|
|
}
|