convert

package
v0.0.0-...-6165865 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPortraits

func ConvertPortraits(detector *facedetect.Detector, infiles []string, outdir string, opts ...ConvertOption)

ConvertPortraits concurrently converts the images at paths given in infiles to portraits and outputs the results to outpath. It's recommended to use the embedded cascade.Detector. Check ConvertOption for configurable options

Types

type ConvertOption

type ConvertOption func(*config)

func WithEXIF

func WithEXIF(useEXIF bool) ConvertOption

WithEXIF configures the converter to automatically rotate images based on EXIF orientation data. The default is true

func WithLogger

func WithLogger(logger *slog.Logger) ConvertOption

WithLogger configures the converter's logger. The default is a logger that logs error messages to stderr

func WithOverwrite

func WithOverwrite(overwrite bool) ConvertOption

WithOverwrite configures the converter to overwrite existing images. The default is false

func WithPortraitConfig

func WithPortraitConfig(pc *facedetect.PortraitConfig) ConvertOption

WithPortraitConfig configures the PortraitConfig for converting portraits. The default is facedetect.DefaultPortraitConfig

func WithWorkers

func WithWorkers(workers int) ConvertOption

WithWorkers configures the number concurrent workers. The default is runtime.NumCPU()

Jump to

Keyboard shortcuts

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