photoprism/internal/frame/image.go
Michael Mayer a30cbb19b7 Albums: Regenerate share preview after one hour and after changes #3658
Signed-off-by: Michael Mayer <michael@photoprism.app>
2023-09-08 17:36:56 +02:00

18 lines
400 B
Go

package frame
import (
"fmt"
"image"
"github.com/photoprism/photoprism/pkg/clean"
)
// Image embeds the specified image file into a frame and returns the resulting image.
func Image(t Type, img image.Image, rotate float64) (image.Image, error) {
switch t {
case Polaroid:
return polaroid(img, rotate)
default:
return img, fmt.Errorf("unknown collage type %s", clean.Log(string(t)))
}
}