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
- 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, webpcfg 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 interface { SetLossless(v int) GetLossless() int SetMethod(v int) SetImageHint(v int) SetTargetSize(v int) SetTargetPSNR(v float32) SetSegments(v int) SetSnsStrength(v int) SetFilterStrength(v int) SetFilterSharpness(v int) SetAutofilter(v int) SetAlphaCompression(v int) SetAlphaFiltering(v int) SetPass(v int) SetShowCompressed(v int) SetPreprocessing(v int) SetPartitions(v int) SetPartitionLimit(v int) SetEmulateJpegSize(v int) SetThreadLevel(v int) SetLowMemory(v int) SetNearLossless(v int) SetExact(v int) SetUseDeltaPalette(v int) SetUseSharpYuv(v int) SetAlphaQuality(v int) SetFilterType(v int) SetQuality(v float32) // contains filtered or unexported methods }
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, webpcfg 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.