common

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package common captures the unsafe orchestration that needs to occur when interacting with libwebp. The function implementations can be swapped out based on the desired implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(buf []byte, dec DecoderFunc, free FreeFunc) (image.Image, error)

Decode the webp data into an image.Image.

func Encode

func Encode(w io.Writer, m *image.NRGBA, q float32, enc EncodeFunc, free FreeFunc) error

Encode an RGBA webp image into the provided writer.

Types

type DecoderFunc

type DecoderFunc func(data uintptr, data_size uint64, width uintptr, height uintptr) (rgba uintptr)

type EncodeFunc

type EncodeFunc func(in uintptr, w int32, h int32, bps int32, q float32, out uintptr) (size uint64)

type FreeFunc

type FreeFunc func(uintptr)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL