Versions in this module Expand all Collapse all v1 v1.2.1 Jan 10, 2022 Changes in this version + const DefaulQuality + const MemPMagic + func C_webpFree(p unsafe.Pointer) + func C_webpMalloc(size C_size_t) unsafe.Pointer + func ChannelsOf(m image.Image) int + func ColorModel(channels int, dataType reflect.Kind) color.Model + func Decode(r io.Reader) (m image.Image, err error) + func DecodeConfig(r io.Reader) (config image.Config, err error) + func DecodeGray(data []byte) (m *image.Gray, err error) + func DecodeGrayToSize(data []byte, width, height int) (m *image.Gray, err error) + func DecodeRGBA(data []byte) (m *image.RGBA, err error) + func DecodeRGBAToSize(data []byte, width, height int) (m *image.RGBA, err error) + func DepthOf(m image.Image) int + func Encode(w io.Writer, m image.Image, opt *Options) (err error) + func EncodeExactLosslessRGBA(m image.Image) (data []byte, err error) + func EncodeGray(m image.Image, quality float32) (data []byte, err error) + func EncodeLosslessGray(m image.Image) (data []byte, err error) + func EncodeLosslessRGB(m image.Image) (data []byte, err error) + func EncodeLosslessRGBA(m image.Image) (data []byte, err error) + func EncodeRGB(m image.Image, quality float32) (data []byte, err error) + func EncodeRGBA(m image.Image, quality float32) (data []byte, err error) + func GetInfo(data []byte) (width, height int, hasAlpha bool, err error) + func GetMetadata(data []byte, format string) (metadata []byte, err error) + func Load(name string) (m image.Image, err error) + func LoadConfig(name string) (config image.Config, err error) + func Save(name string, m image.Image, opt *Options) (err error) + func SetMetadata(data, metadata []byte, format string) (newData []byte, err error) + func SizeofImage(m image.Image) int + func SizeofKind(dataType reflect.Kind) int + func SizeofPixel(channels int, dataType reflect.Kind) int + type C_double C.double + type C_float C.float + type C_int C.int + func C_webpDecodeGrayToSize(data *C_uint8_t, data_size C_size_t, width C_int, height C_int, ...) C_int + func C_webpDecodeRGBAToSize(data *C_uint8_t, data_size C_size_t, width C_int, height C_int, ...) C_int + func C_webpDecodeRGBToSize(data *C_uint8_t, data_size C_size_t, width C_int, height C_int, ...) C_int + func C_webpGetInfo(data *C_uint8_t, data_size C_size_t, width *C_int, height *C_int, ...) C_int + type C_int16_t C.int16_t + type C_int32_t C.int32_t + type C_int64_t C.int64_t + type C_int8_t C.int8_t + type C_size_t C.size_t + type C_uint C.uint + type C_uint16_t C.uint16_t + type C_uint32_t C.uint32_t + type C_uint64_t C.uint64_t + type C_uint8_t C.uint8_t + func C_webpDecodeGray(data *C_uint8_t, data_size C_size_t, width *C_int, height *C_int) *C_uint8_t + func C_webpDecodeRGB(data *C_uint8_t, data_size C_size_t, width *C_int, height *C_int) *C_uint8_t + func C_webpDecodeRGBA(data *C_uint8_t, data_size C_size_t, width *C_int, height *C_int) *C_uint8_t + func C_webpEncodeGray(pix *C_uint8_t, width C_int, height C_int, stride C_int, ...) *C_uint8_t + func C_webpEncodeLosslessGray(pix *C_uint8_t, width C_int, height C_int, stride C_int, output_size *C_size_t) *C_uint8_t + func C_webpEncodeLosslessRGB(pix *C_uint8_t, width C_int, height C_int, stride C_int, output_size *C_size_t) *C_uint8_t + func C_webpEncodeLosslessRGBA(exact C_int, pix *C_uint8_t, width C_int, height C_int, stride C_int, ...) *C_uint8_t + func C_webpEncodeRGB(pix *C_uint8_t, width C_int, height C_int, stride C_int, ...) *C_uint8_t + func C_webpEncodeRGBA(pix *C_uint8_t, width C_int, height C_int, stride C_int, ...) *C_uint8_t + type ColorModelInterface interface + Channels func() int + DataType func() reflect.Kind + type MemP interface + Bounds func() image.Rectangle + Channels func() int + DataType func() reflect.Kind + MemPMagic func() string + Pix func() []byte + Stride func() int + type MemPColor struct + Channels int + DataType reflect.Kind + Pix PixSlice + func (c MemPColor) RGBA() (r, g, b, a uint32) + type MemPImage struct + XChannels int + XDataType reflect.Kind + XMemPMagic string + XPix PixSlice + XRect image.Rectangle + XStride int + func AsMemPImage(m interface{}) (p *MemPImage, ok bool) + func NewMemPImage(r image.Rectangle, channels int, dataType reflect.Kind) *MemPImage + func NewMemPImageFrom(m image.Image) *MemPImage + func (p *MemPImage) AsStdImage() (m image.Image, ok bool) + func (p *MemPImage) At(x, y int) color.Color + func (p *MemPImage) Bounds() image.Rectangle + func (p *MemPImage) Channels() int + func (p *MemPImage) Clone() *MemPImage + func (p *MemPImage) ColorModel() color.Model + func (p *MemPImage) DataType() reflect.Kind + func (p *MemPImage) MemPMagic() string + func (p *MemPImage) Pix() []byte + func (p *MemPImage) PixOffset(x, y int) int + func (p *MemPImage) PixelAt(x, y int) []byte + func (p *MemPImage) Set(x, y int, c color.Color) + func (p *MemPImage) SetPixel(x, y int, c []byte) + func (p *MemPImage) StdImage() image.Image + func (p *MemPImage) Stride() int + func (p *MemPImage) SubImage(r image.Rectangle) image.Image + type Options struct + Exact bool + Lossless bool + Quality float32 + type PixSlice []byte + func AsPixSilce(slice interface{}) (d PixSlice) + func (d PixSlice) Bytes() (v []byte) + func (d PixSlice) Complex128s() (v []complex128) + func (d PixSlice) Complex64s() (v []complex64) + func (d PixSlice) Float32s() (v []float32) + func (d PixSlice) Float64s() (v []float64) + func (d PixSlice) Int16s() (v []int16) + func (d PixSlice) Int32s() (v []int32) + func (d PixSlice) Int64s() (v []int64) + func (d PixSlice) Int8s() (v []int8) + func (d PixSlice) SetValue(i int, dataType reflect.Kind, v float64) + func (d PixSlice) Slice(newSliceType reflect.Type) interface{} + func (d PixSlice) SwapEndian(dataType reflect.Kind) + func (d PixSlice) Uint16s() (v []uint16) + func (d PixSlice) Uint32s() (v []uint32) + func (d PixSlice) Uint64s() (v []uint64) + func (d PixSlice) Uint8s() []uint8 + func (d PixSlice) Value(i int, dataType reflect.Kind) float64 + type RGB48Image struct + XPix []uint8 + XRect image.Rectangle + XStride int + func NewRGB48Image(r image.Rectangle) *RGB48Image + func NewRGB48ImageFrom(m image.Image) *RGB48Image + func (p *RGB48Image) At(x, y int) color.Color + func (p *RGB48Image) Bounds() image.Rectangle + func (p *RGB48Image) Channels() int + func (p *RGB48Image) ColorModel() color.Model + func (p *RGB48Image) DataType() reflect.Kind + func (p *RGB48Image) MemPMagic() string + func (p *RGB48Image) Opaque() bool + func (p *RGB48Image) Pix() []byte + func (p *RGB48Image) PixOffset(x, y int) int + func (p *RGB48Image) RGB48At(x, y int) [3]uint16 + func (p *RGB48Image) Set(x, y int, c color.Color) + func (p *RGB48Image) SetRGB48(x, y int, c [3]uint16) + func (p *RGB48Image) Stride() int + func (p *RGB48Image) SubImage(r image.Rectangle) image.Image + type RGBImage struct + XPix []uint8 + XRect image.Rectangle + XStride int + func DecodeRGB(data []byte) (m *RGBImage, err error) + func DecodeRGBToSize(data []byte, width, height int) (m *RGBImage, err error) + func NewRGBImage(r image.Rectangle) *RGBImage + func NewRGBImageFrom(m image.Image) *RGBImage + func (p *RGBImage) At(x, y int) color.Color + func (p *RGBImage) Bounds() image.Rectangle + func (p *RGBImage) Channels() int + func (p *RGBImage) ColorModel() color.Model + func (p *RGBImage) DataType() reflect.Kind + func (p *RGBImage) MemPMagic() string + func (p *RGBImage) Opaque() bool + func (p *RGBImage) Pix() []byte + func (p *RGBImage) PixOffset(x, y int) int + func (p *RGBImage) RGBAt(x, y int) [3]uint8 + func (p *RGBImage) Set(x, y int, c color.Color) + func (p *RGBImage) SetRGB(x, y int, c [3]uint8) + func (p *RGBImage) Stride() int + func (p *RGBImage) SubImage(r image.Rectangle) image.Image + type SizeofImager interface + SizeofImage func() int