Documentation
¶
Index ¶
- func Clamp[T cmp.Ordered](value, mn, mx T) T
- func IntersectNRGBA(dst *image.NRGBA, r image.Rectangle, src *image.NRGBA, sp image.Point, ...) image.Rectangle
- func IntersectRGBA(dst *image.RGBA, r image.Rectangle, src *image.RGBA, sp image.Point, ...) image.Rectangle
- func IsColorModelSupported(model color.Model) bool
- func Iterate[T image.Image](pixIter PixelIterator, pixCalc PixCalculator[T], ...) T
- type Config
- type DefaultOutputMode
- type Output
- type OutputMode
- type ParallelPixelIterator
- type PixCalculator
- type PixRowCalculator
- type PixelIterator
- type SerialPixelIterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IntersectNRGBA ¶
func IntersectRGBA ¶
func IsColorModelSupported ¶
func Iterate ¶
func Iterate[T image.Image](pixIter PixelIterator, pixCalc PixCalculator[T], fn func(dst, src, out []uint8)) T
Types ¶
type Config ¶
type Config interface {
PixelIterator() PixelIterator
DefaultOutputMode() DefaultOutputMode
DefaultColorModel() color.Model
}
type DefaultOutputMode ¶
type DefaultOutputMode int
const ( DefaultOutputToDst DefaultOutputMode = iota DefaultOutputToNewImage )
func (DefaultOutputMode) ToOutputMode ¶
func (m DefaultOutputMode) ToOutputMode() OutputMode
type Output ¶
type Output interface {
OutputMode() OutputMode
ColorModel() color.Model
ProvidedImage() (image.Image, image.Point)
}
func ToNewImage ¶
func ToNewImage() Output
func ToNewNRGBAImage ¶
func ToNewNRGBAImage() Output
func ToNewRGBAImage ¶
func ToNewRGBAImage() Output
type OutputMode ¶
type OutputMode int
const ( OutputToDst OutputMode = iota OutputToNewImage OutputToProvidedImage )
type ParallelPixelIterator ¶
type ParallelPixelIterator struct {
// contains filtered or unexported fields
}
ParallelPixelIterator iterates over a PixRowCalculator in parallel with the specified concurrency.
func NewParallelPixelIterator ¶
func NewParallelPixelIterator(concurrency int) ParallelPixelIterator
NewParallelPixelIterator creates a new ParallelPixelIterator. Concurrency specifies the number of goroutines to use for parallel processing. Each iteration will create its own set of goroutines, so concurrently processing multiple images will result in multiple sets of goroutines.
func (ParallelPixelIterator) Iterate ¶
func (ppi ParallelPixelIterator) Iterate(pixCalc PixRowCalculator, fn func(dst, src, out []uint8))
type PixCalculator ¶
type PixCalculator[T image.Image] interface { PixRowCalculator Result() T }
func NewPixCalculatorNRGBA ¶
type PixRowCalculator ¶
type PixelIterator ¶
type PixelIterator interface {
Iterate(pixCalc PixRowCalculator, fn func(dst, src, out []uint8))
}
func NewPixelIterator ¶
func NewPixelIterator(concurrency int) PixelIterator
type SerialPixelIterator ¶
type SerialPixelIterator struct{}
SerialPixelIterator iterates over a PixRowCalculator in serial with no concurrency.
func NewSerialPixelIterator ¶
func NewSerialPixelIterator() SerialPixelIterator
NewSerialPixelIterator creates a new SerialPixelIterator.
func (SerialPixelIterator) Iterate ¶
func (i SerialPixelIterator) Iterate(pixCalc PixRowCalculator, fn func(dst, src, out []uint8))
Click to show internal directories.
Click to hide internal directories.