pixelsort

package
v0.0.0-...-db9c320 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ThresholdScale = 100

Variables

View Source
var SortTypes = []string{"MeanComp", "RedComp", "GreenComp", "BlueComp"}
View Source
var ThresholdTypes = []string{"LoThresholdColorMean", "HiThresholdColorMean", "OutThresholdColorMean", "InThresholdColorMean"}

Functions

This section is empty.

Types

type NewOpt

type NewOpt func(*PixelSort)

func WithChunkLimit

func WithChunkLimit(lim int) NewOpt

func WithDirection

func WithDirection(dir lib.Direction) NewOpt

func WithInvert

func WithInvert(invert bool) NewOpt

func WithSeed

func WithSeed(seed int64) NewOpt

func WithSortFuncString

func WithSortFuncString(sortFunc string) NewOpt

func WithThreshold

func WithThreshold(threshold int) NewOpt

func WithThresholdFuncString

func WithThresholdFuncString(thresholdFunc string) NewOpt

type PixelSort

type PixelSort struct {
	ThresholdFunc ThresholdFunc

	SorterFunc SorterFunc
	// contains filtered or unexported fields
}

func Must

func Must(ps *PixelSort, err error) *PixelSort

func New

func New(path string, opts ...NewOpt) (*PixelSort, error)

func (*PixelSort) BlueComp

func (ps *PixelSort) BlueComp(a, b color.Color) bool

func (*PixelSort) GreenComp

func (ps *PixelSort) GreenComp(a, b color.Color) bool

func (*PixelSort) HiThresholdColorMean

func (ps *PixelSort) HiThresholdColorMean(color color.Color) bool

Only colors above the threshold will sort

func (*PixelSort) InThresholdColorMean

func (ps *PixelSort) InThresholdColorMean(color color.Color) bool

Only colors outside the range will sort

func (*PixelSort) LoThresholdColorMean

func (ps *PixelSort) LoThresholdColorMean(color color.Color) bool

Only colors below the threshold will sort

func (*PixelSort) MeanComp

func (ps *PixelSort) MeanComp(a, b color.Color) bool

func (*PixelSort) OutThresholdColorMean

func (ps *PixelSort) OutThresholdColorMean(color color.Color) bool

Only colors inside the range will sort

func (*PixelSort) RedComp

func (ps *PixelSort) RedComp(a, b color.Color) bool

func (*PixelSort) Sort

func (ps *PixelSort) Sort() *image.RGBA64

type SorterFunc

type SorterFunc func(a, b color.Color) bool

type ThresholdFunc

type ThresholdFunc func(color color.Color) bool

Jump to

Keyboard shortcuts

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