mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
People: Improve thumb size config and flag descriptions #22
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user