Support all encoding options.

This commit is contained in:
Shunsuke Michii 2016-06-27 14:47:42 +09:00
parent b54cbd7f6d
commit fff8a5bbce
3 changed files with 363 additions and 47 deletions

View file

@ -21,6 +21,17 @@ const (
YUV420A ColorSpace = C.WEBP_YUV420A
)
// ImageHint corresponds to C.WebPImageHint.
type ImageHint int
const (
HintDefault ImageHint = C.WEBP_HINT_DEFAULT
HintPicture ImageHint = C.WEBP_HINT_PICTURE
HintPhoto ImageHint = C.WEBP_HINT_PHOTO
HintGraph ImageHint = C.WEBP_HINT_GRAPH
HintLast ImageHint = C.WEBP_HINT_LAST
)
// Preset corresponds to C.WebPPreset.
type Preset int
@ -48,3 +59,15 @@ const (
// StrongFilter (=1)
StrongFilter
)
// Preprocessing corresponds to preprocessing filter parameter.
type Preprocessing int
const (
// PreprocessingNone specifies to disable preprocessing filter.
PreprocessingNone = 0
// PreprocessingSegmentSmooth specifies segment-smooth filter.
PreprocessingSegmentSmooth = 1
//PreprocessingPseudoRandomDithering specifies pseudo-random dithering filter.
PreprocessingPseudoRandomDithering = 2
)