processor

package
v0.0.0-...-c407878 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileHandler

type FileHandler interface {
	LoadImage(path string) (image.Image, error)
	SaveImage(img image.Image, path, format string, cfg *config.Config) error
	CreateDir(path string) error
	ReadDir(path string) ([]os.DirEntry, error)
}

type ImageProcessor

type ImageProcessor struct {
	Watermark     image.Image
	OutputDir     string
	Config        *config.Config
	WatermarkMode string
	FileHandler   FileHandler
}

func NewImageProcessor

func NewImageProcessor(watermarkPath string, cfg *config.Config, fileHandler FileHandler) (*ImageProcessor, error)

func (*ImageProcessor) ProcessFolder

func (p *ImageProcessor) ProcessFolder(imageDir, outputFormat string, progress ProgressCallback) error

type ProgressCallback

type ProgressCallback func(current, total int, img *canvas.Image, fileName string)

Jump to

Keyboard shortcuts

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