Documentation
¶
Index ¶
- Constants
- func WebPAnimEncoderAdd(webPAnimEncoder *WebPAnimEncoder, webPPicture *WebPPicture, timestamp int, ...) int
- func WebPAnimEncoderAssemble(webPAnimEncoder *WebPAnimEncoder, webPData *WebPData) int
- func WebPAnimEncoderDelete(webPAnimEncoder *WebPAnimEncoder)
- func WebPAnimEncoderOptionsInitInternal(webPAnimEncoderOptions *WebPAnimEncoderOptions) int
- func WebPConfigInitInternal(config *WebPConfig) int
- func WebPDataClear(webPData *WebPData)
- func WebPDataInit(webPData *WebPData)
- func WebPMuxDelete(webPMux *WebPMux)
- func WebPPictureFree(webPPicture *WebPPicture)
- func WebPPictureImportRGBA(data []byte, stride int, webPPicture *WebPPicture) error
- func WebPPictureInit(webPPicture *WebPPicture) int
- type WebPAnimEncoder
- type WebPAnimEncoderOptions
- func (encOptions *WebPAnimEncoderOptions) GetAnimParams() WebPMuxAnimParams
- func (encOptions *WebPAnimEncoderOptions) SetAllowMixed(v int)
- func (encOptions *WebPAnimEncoderOptions) SetAnimParams(v WebPMuxAnimParams)
- func (encOptions *WebPAnimEncoderOptions) SetKmax(v int)
- func (encOptions *WebPAnimEncoderOptions) SetKmin(v int)
- func (encOptions *WebPAnimEncoderOptions) SetMinimizeSize(v int)
- func (encOptions *WebPAnimEncoderOptions) SetVerbose(v int)
- type WebPConfig
- func (webpCfg WebPConfig) GetLossless() int
- func (webpCfg *WebPConfig) SetAlphaCompression(v int)
- func (webpCfg *WebPConfig) SetAlphaFiltering(v int)
- func (webpCfg *WebPConfig) SetAlphaQuality(v int)
- func (webpCfg *WebPConfig) SetAutofilter(v int)
- func (webpCfg *WebPConfig) SetEmulateJpegSize(v int)
- func (webpCfg *WebPConfig) SetExact(v int)
- func (webpCfg *WebPConfig) SetFilterSharpness(v int)
- func (webpCfg *WebPConfig) SetFilterStrength(v int)
- func (webpCfg *WebPConfig) SetFilterType(v int)
- func (webpCfg *WebPConfig) SetImageHint(v int)
- func (webpCfg *WebPConfig) SetLossless(v int)
- func (webpCfg *WebPConfig) SetLowMemory(v int)
- func (webpCfg *WebPConfig) SetMethod(v int)
- func (webpCfg *WebPConfig) SetNearLossless(v int)
- func (webpCfg *WebPConfig) SetPartitionLimit(v int)
- func (webpCfg *WebPConfig) SetPartitions(v int)
- func (webpCfg *WebPConfig) SetPass(v int)
- func (webpCfg *WebPConfig) SetPreprocessing(v int)
- func (webpCfg *WebPConfig) SetQuality(v float32)
- func (webpCfg *WebPConfig) SetSegments(v int)
- func (webpCfg *WebPConfig) SetShowCompressed(v int)
- func (webpCfg *WebPConfig) SetSnsStrength(v int)
- func (webpCfg *WebPConfig) SetTargetPSNR(v float32)
- func (webpCfg *WebPConfig) SetTargetSize(v int)
- func (webpCfg *WebPConfig) SetThreadLevel(v int)
- func (webpCfg *WebPConfig) SetUseDeltaPalette(v int)
- func (webpCfg *WebPConfig) SetUseSharpYuv(v int)
- type WebPData
- type WebPMux
- type WebPMuxAnimParams
- type WebPMuxError
- type WebPPicture
- type WebpAnimation
Constants ¶
View Source
const ( WebpMuxAbiVersion = 0x0108 WebpEncoderAbiVersion = 0x020f )
View Source
const ( WebpMuxOk = WebPMuxError(C.WEBP_MUX_OK) WebpMuxNotFound = WebPMuxError(C.WEBP_MUX_NOT_FOUND) WebpMuxInvalidArgument = WebPMuxError(C.WEBP_MUX_INVALID_ARGUMENT) WebpMuxBadData = WebPMuxError(C.WEBP_MUX_BAD_DATA) WebpMuxMemoryError = WebPMuxError(C.WEBP_MUX_MEMORY_ERROR) WebpMuxNotEnoughData = WebPMuxError(C.WEBP_MUX_NOT_ENOUGH_DATA) )
Variables ¶
This section is empty.
Functions ¶
func WebPAnimEncoderAdd ¶
func WebPAnimEncoderAdd(webPAnimEncoder *WebPAnimEncoder, webPPicture *WebPPicture, timestamp int, webPConfig *WebPConfig) int
func WebPAnimEncoderAssemble ¶
func WebPAnimEncoderAssemble(webPAnimEncoder *WebPAnimEncoder, webPData *WebPData) int
func WebPAnimEncoderDelete ¶
func WebPAnimEncoderDelete(webPAnimEncoder *WebPAnimEncoder)
func WebPAnimEncoderOptionsInitInternal ¶
func WebPAnimEncoderOptionsInitInternal(webPAnimEncoderOptions *WebPAnimEncoderOptions) int
func WebPConfigInitInternal ¶
func WebPConfigInitInternal(config *WebPConfig) int
func WebPDataClear ¶
func WebPDataClear(webPData *WebPData)
func WebPDataInit ¶
func WebPDataInit(webPData *WebPData)
func WebPMuxDelete ¶
func WebPMuxDelete(webPMux *WebPMux)
func WebPPictureFree ¶
func WebPPictureFree(webPPicture *WebPPicture)
func WebPPictureImportRGBA ¶
func WebPPictureImportRGBA(data []byte, stride int, webPPicture *WebPPicture) error
func WebPPictureInit ¶
func WebPPictureInit(webPPicture *WebPPicture) int
Types ¶
type WebPAnimEncoder ¶
type WebPAnimEncoder C.WebPAnimEncoder
func WebPAnimEncoderNewInternal ¶
func WebPAnimEncoderNewInternal(width, height int, webPAnimEncoderOptions *WebPAnimEncoderOptions) *WebPAnimEncoder
type WebPAnimEncoderOptions ¶
type WebPAnimEncoderOptions C.WebPAnimEncoderOptions
func (*WebPAnimEncoderOptions) GetAnimParams ¶
func (encOptions *WebPAnimEncoderOptions) GetAnimParams() WebPMuxAnimParams
func (*WebPAnimEncoderOptions) SetAllowMixed ¶
func (encOptions *WebPAnimEncoderOptions) SetAllowMixed(v int)
func (*WebPAnimEncoderOptions) SetAnimParams ¶
func (encOptions *WebPAnimEncoderOptions) SetAnimParams(v WebPMuxAnimParams)
func (*WebPAnimEncoderOptions) SetKmax ¶
func (encOptions *WebPAnimEncoderOptions) SetKmax(v int)
func (*WebPAnimEncoderOptions) SetKmin ¶
func (encOptions *WebPAnimEncoderOptions) SetKmin(v int)
func (*WebPAnimEncoderOptions) SetMinimizeSize ¶
func (encOptions *WebPAnimEncoderOptions) SetMinimizeSize(v int)
func (*WebPAnimEncoderOptions) SetVerbose ¶
func (encOptions *WebPAnimEncoderOptions) SetVerbose(v int)
type WebPConfig ¶
type WebPConfig C.WebPConfig
func (WebPConfig) GetLossless ¶
func (webpCfg WebPConfig) GetLossless() int
func (*WebPConfig) SetAlphaCompression ¶
func (webpCfg *WebPConfig) SetAlphaCompression(v int)
func (*WebPConfig) SetAlphaFiltering ¶
func (webpCfg *WebPConfig) SetAlphaFiltering(v int)
func (*WebPConfig) SetAlphaQuality ¶
func (webpCfg *WebPConfig) SetAlphaQuality(v int)
func (*WebPConfig) SetAutofilter ¶
func (webpCfg *WebPConfig) SetAutofilter(v int)
func (*WebPConfig) SetEmulateJpegSize ¶
func (webpCfg *WebPConfig) SetEmulateJpegSize(v int)
func (*WebPConfig) SetExact ¶
func (webpCfg *WebPConfig) SetExact(v int)
func (*WebPConfig) SetFilterSharpness ¶
func (webpCfg *WebPConfig) SetFilterSharpness(v int)
func (*WebPConfig) SetFilterStrength ¶
func (webpCfg *WebPConfig) SetFilterStrength(v int)
func (*WebPConfig) SetFilterType ¶
func (webpCfg *WebPConfig) SetFilterType(v int)
func (*WebPConfig) SetImageHint ¶
func (webpCfg *WebPConfig) SetImageHint(v int)
func (*WebPConfig) SetLossless ¶
func (webpCfg *WebPConfig) SetLossless(v int)
func (*WebPConfig) SetLowMemory ¶
func (webpCfg *WebPConfig) SetLowMemory(v int)
func (*WebPConfig) SetMethod ¶
func (webpCfg *WebPConfig) SetMethod(v int)
func (*WebPConfig) SetNearLossless ¶
func (webpCfg *WebPConfig) SetNearLossless(v int)
func (*WebPConfig) SetPartitionLimit ¶
func (webpCfg *WebPConfig) SetPartitionLimit(v int)
func (*WebPConfig) SetPartitions ¶
func (webpCfg *WebPConfig) SetPartitions(v int)
func (*WebPConfig) SetPass ¶
func (webpCfg *WebPConfig) SetPass(v int)
func (*WebPConfig) SetPreprocessing ¶
func (webpCfg *WebPConfig) SetPreprocessing(v int)
func (*WebPConfig) SetQuality ¶
func (webpCfg *WebPConfig) SetQuality(v float32)
func (*WebPConfig) SetSegments ¶
func (webpCfg *WebPConfig) SetSegments(v int)
func (*WebPConfig) SetShowCompressed ¶
func (webpCfg *WebPConfig) SetShowCompressed(v int)
func (*WebPConfig) SetSnsStrength ¶
func (webpCfg *WebPConfig) SetSnsStrength(v int)
func (*WebPConfig) SetTargetPSNR ¶
func (webpCfg *WebPConfig) SetTargetPSNR(v float32)
func (*WebPConfig) SetTargetSize ¶
func (webpCfg *WebPConfig) SetTargetSize(v int)
func (*WebPConfig) SetThreadLevel ¶
func (webpCfg *WebPConfig) SetThreadLevel(v int)
func (*WebPConfig) SetUseDeltaPalette ¶
func (webpCfg *WebPConfig) SetUseDeltaPalette(v int)
func (*WebPConfig) SetUseSharpYuv ¶
func (webpCfg *WebPConfig) SetUseSharpYuv(v int)
type WebPMux ¶
func WebPMuxCreateInternal ¶
type WebPMuxAnimParams ¶
type WebPMuxAnimParams C.WebPMuxAnimParams
func (*WebPMuxAnimParams) SetBgcolor ¶
func (wmap *WebPMuxAnimParams) SetBgcolor(v uint32)
func (*WebPMuxAnimParams) SetLoopCount ¶
func (wmap *WebPMuxAnimParams) SetLoopCount(v int)
type WebPMuxError ¶
type WebPMuxError int
func WebPMuxAssemble ¶
func WebPMuxAssemble(webPMux *WebPMux, webPData *WebPData) WebPMuxError
func WebPMuxGetAnimationParams ¶
func WebPMuxGetAnimationParams(webPMux *WebPMux, webPMuxAnimParams *WebPMuxAnimParams) WebPMuxError
func WebPMuxSetAnimationParams ¶
func WebPMuxSetAnimationParams(webPMux *WebPMux, webPMuxAnimParams *WebPMuxAnimParams) WebPMuxError
type WebPPicture ¶
type WebPPicture C.WebPPicture
func (WebPPicture) GetHeight ¶
func (wpp WebPPicture) GetHeight() int
func (WebPPicture) GetWidth ¶
func (wpp WebPPicture) GetWidth() int
func (*WebPPicture) SetHeight ¶
func (wpp *WebPPicture) SetHeight(v int)
func (*WebPPicture) SetUseArgb ¶
func (wpp *WebPPicture) SetUseArgb(v int)
func (*WebPPicture) SetWidth ¶
func (wpp *WebPPicture) SetWidth(v int)
type WebpAnimation ¶
type WebpAnimation struct { WebPAnimEncoderOptions *WebPAnimEncoderOptions Width int Height int AnimationEncoder *WebPAnimEncoder WebPData *WebPData WebPMux *WebPMux WebPPictures []*WebPPicture // contains filtered or unexported fields }
func NewWebpAnimation ¶
func NewWebpAnimation(width, height, loopCount int) *WebpAnimation
NewWebpAnimation Initialize animation
func (*WebpAnimation) AddFrame ¶
func (wpa *WebpAnimation) AddFrame(img image.Image, timestamp int, webPConfig *WebPConfig) error
AddFrame add frame to animation
func (*WebpAnimation) Encode ¶
func (wpa *WebpAnimation) Encode(w io.Writer) error
Encode encode animation
func (*WebpAnimation) ReleaseMemory ¶
func (wpa *WebpAnimation) ReleaseMemory()
ReleaseMemory release memory
Click to show internal directories.
Click to hide internal directories.