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 { AlphaFiltering int PartitionLimit int AlphaCompression int ImageHint ImageHint TargetSize int Exact int Segments int SnsStrength int FilterStrength int FilterSharpness int FilterType int NearLossless int Method int Partitions int Pass int Preprocessing int Quality float32 TargetPsnr float32 ShowCompressed bool ThreadLevel bool EmulateJpegSize bool UseSharpYuv bool LowMemory bool Autofilter bool UseDeltaPalette bool Lossless 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.