Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder stores information to encode image
func NewEncoder ¶
NewEncoder return new encoder instance
type EncodingPreset ¶
type EncodingPreset int
EncodingPreset using Preset
const ( PresetDefault EncodingPreset = iota PresetPicture PresetPhoto PresetDrawing PresetIcon PresetText )
Default libwebp presets noinspection GoUnusedConst
type Options ¶
type Options struct {
Lossless bool
Quality float32
Method int
ImageHint ImageHint
TargetSize int
TargetPsnr float32
Segments int
SnsStrength int
FilterStrength int
FilterSharpness int
FilterType int
Autofilter bool
AlphaCompression int
AlphaFiltering int
Pass int
// Disabled for compatibility with old version libwebp
// QMin int
// QMax int
ShowCompressed bool
Preprocessing int
Partitions int
PartitionLimit int
EmulateJpegSize bool
ThreadLevel bool
LowMemory bool
NearLossless int
Exact int
UseDeltaPalette bool
UseSharpYuv bool
// contains filtered or unexported fields
}
Options specifies webp encoding parameters
func NewLosslessEncoderOptions ¶
func NewLosslessEncoderOptions(preset EncodingPreset, level int) (options *Options, err error)
NewLosslessEncoderOptions build lossless encoding options
func NewLossyEncoderOptions ¶
func NewLossyEncoderOptions(preset EncodingPreset, quality float32) (options *Options, err error)
NewLossyEncoderOptions build lossy encoding options
Click to show internal directories.
Click to hide internal directories.