Search
Preparing search index...
The search index is not available
Image Quantization Library (image-q)
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
IQ
Image
DitherErrorDiffusion
Class DitherErrorDiffusion
Hierarchy
DitherErrorDiffusion
Implements
IImageDitherer
Index
Constructors
constructor
Properties
_calculate
Error
LikeGIMP
_distance
_kernel
_min
Color
Distance
_serpentine
Methods
_fill
Error
Line
_set
Kernel
quantize
Constructors
constructor
new
Dither
Error
Diffusion
(
colorDistanceCalculator
:
IDistanceCalculator
, kernel
:
DitherErrorDiffusionKernel
, serpentine
?:
boolean
, minimumColorDistanceToDither
?:
number
, calculateErrorLikeGIMP
?:
boolean
)
:
DitherErrorDiffusion
Parameters
colorDistanceCalculator:
IDistanceCalculator
kernel:
DitherErrorDiffusionKernel
Default value
serpentine:
boolean
= true
Default value
minimumColorDistanceToDither:
number
= 0
Default value
calculateErrorLikeGIMP:
boolean
= false
Returns
DitherErrorDiffusion
Properties
Private
_calculate
Error
LikeGIMP
_calculate
Error
LikeGIMP
:
boolean
Private
_distance
_distance
:
IDistanceCalculator
Private
_kernel
_kernel
:
number
[]
Private
_min
Color
Distance
_min
Color
Distance
:
number
Private
_serpentine
_serpentine
:
boolean
Methods
Private
_fill
Error
Line
_fill
Error
Line
(
errorLine
:
number
[]
, width
:
number
)
:
void
Parameters
errorLine:
number
[]
width:
number
Returns
void
Private
_set
Kernel
_set
Kernel
(
kernel
:
DitherErrorDiffusionKernel
)
:
void
Parameters
kernel:
DitherErrorDiffusionKernel
Returns
void
quantize
quantize
(
pointBuffer
:
PointContainer
, palette
:
Palette
)
:
PointContainer
Parameters
pointBuffer:
PointContainer
palette:
Palette
Returns
PointContainer
Globals
Externals
IQ
IQ.
Color
IQ.
Color.
Constants
IQ.
Color.
Constants.sRGB
IQ.
Distance
IQ.
Image
IQ.
Palette
IQ.
Quality
IQ.
Utils
Dither
Error
Diffusion
Kernel
Dither
Error
Diffusion
constructor
_calculate
Error
LikeGIMP
_distance
_kernel
_min
Color
Distance
_serpentine
_fill
Error
Line
_set
Kernel
quantize
Nearest
Color
IImage
Ditherer
Generated using
TypeDoc