People: Improve thumb size config and flag descriptions #22

This commit is contained in:
Michael Mayer
2021-09-05 13:48:53 +02:00
parent b2a30d8091
commit b9d1c7afb3
25 changed files with 334 additions and 269 deletions

View File

@@ -21,6 +21,8 @@ import (
"github.com/photoprism/photoprism/pkg/txt"
)
// SharePreview returns a link share preview image.
//
// GET /s/:token/:uid/preview
// TODO: Proof of concept, needs refactoring.
func SharePreview(router *gin.RouterGroup) {
@@ -88,7 +90,7 @@ func SharePreview(router *gin.RouterGroup) {
return
} else if count < 12 {
f := p[0]
size, _ := thumb.Sizes["fit_720"]
size, _ := thumb.Sizes[thumb.Fit720]
fileName := photoprism.FileName(f.FileRoot, f.FileName)
@@ -117,7 +119,7 @@ func SharePreview(router *gin.RouterGroup) {
y := 0
preview := imaging.New(width, height, color.NRGBA{255, 255, 255, 255})
size, _ := thumb.Sizes["tile_224"]
size, _ := thumb.Sizes[thumb.Tile224]
for _, f := range p {
fileName := photoprism.FileName(f.FileRoot, f.FileName)