Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Riemersma = Drawer{}
Riemersma is a draw.Drawer (similar to draw.FloydSteinberg) which does Riemersma dithering to src image and draws result on dst image
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image interface { Size() image.Point // image size ColorNumChannels() int // number of color channels DitherPixel(x int, y int, accErr ColorError) ColorError // Dither pixel with accumulated error }
type Op ¶ added in v0.2.0
type Op struct { Ratio float64 // weight ratio between youngest pixel and oldest pixel Weights []float64 // pre-calculated weights // contains filtered or unexported fields }
Riemersma Dither Operation. It is not resuable.
func NewOperation ¶ added in v0.2.0
Create new Riemersma dither operation with specific queueSize and ratio queueSize is the number of most recent pixel quantization errors to remember ratio is weight ratio between youngest pixel and oldest pixel
func (*Op) AccumulatedError ¶ added in v0.2.0
func (rs *Op) AccumulatedError(numChannel int) ColorError
Click to show internal directories.
Click to hide internal directories.