image

package
v0.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindSpans

func FindSpans(r io.Reader, spans ...*Span) error

func LargerThumbToContext

func LargerThumbToContext(ctx context.Context, th photo.Thumb) context.Context

func Remove

func Remove(data []byte) ([]byte, error)

Types

type Indexer

type Indexer struct {
	// contains filtered or unexported fields
}

func NewIndexer

func NewIndexer(deps indexerDeps) *Indexer

func (*Indexer) Index

func (i *Indexer) Index(ctx context.Context, img photo.Image, flags photo.IndexingFlags) (err error)

func (*Indexer) PhotoImageIndexer

func (i *Indexer) PhotoImageIndexer() photo.ImageIndexer

func (*Indexer) QueueCallback

func (i *Indexer) QueueCallback(ctx context.Context, cb func(ctx context.Context))

func (*Indexer) QueueIndex

func (i *Indexer) QueueIndex(ctx context.Context, img photo.Image, flags photo.IndexingFlags)

type Meta

type Meta struct {
	photo.Exif
	GpsInfo *photo.Gps `json:"gps_info,omitempty"`
	// contains filtered or unexported fields
}

func ReadMeta

func ReadMeta(r io.ReadSeeker) (Meta, error)

func (Meta) ExifData

func (m Meta) ExifData() map[string]any

type Resizer

type Resizer struct {
	Quality int
	Interp  resize.InterpolationFunction
}

type SimilarityIndex

type SimilarityIndex struct{}

func (*SimilarityIndex) Foo

func (si *SimilarityIndex) Foo()

type Span

type Span struct {
	Before        int
	Start, End    []byte
	CaseSensitive bool
	Result        []byte
	Found         bool
	Trim          bool
}

type Thumbnailer

type Thumbnailer struct {
	// contains filtered or unexported fields
}

func NewThumbnailer

func NewThumbnailer(deps ThumbnailerDeps) *Thumbnailer

func (*Thumbnailer) PhotoThumbnailer

func (t *Thumbnailer) PhotoThumbnailer() photo.Thumbnailer

func (*Thumbnailer) Thumbnail

func (t *Thumbnailer) Thumbnail(ctx context.Context, i photo.Image, size photo.ThumbSize) (th photo.Thumb, err error)

type ThumbnailerDeps

type ThumbnailerDeps interface {
	CtxdLogger() ctxd.Logger
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL