vips

package
v0.0.0-...-a4359f9 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Processor

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

Processor is an image processor that uses vips to process images

func New

func New(ctx context.Context, log *logger.Logger, tracer *tracing.Tracer, workers int, cache *image.Cache) (*Processor, error)

New initializes a new processor instance

func (*Processor) ProcessImage

func (p *Processor) ProcessImage(ctx context.Context, task *image.Task) (processedImage []byte, err error)

ProcessImage loads an image from a byte buffer, processes it, and returns a buffer containing the processed image

func (*Processor) Shutdown

func (p *Processor) Shutdown()

Shutdown shuts down the image processor and deinitialises vips

Jump to

Keyboard shortcuts

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