Documentation
¶
Index ¶
- Constants
- Variables
- func Compress(img image.Image, quality int, speed int, floyd float32) (image.Image, error)
- func GoImageToRgba32(im image.Image) []byte
- func LibVersion() string
- func Rgb8PaletteToGoImage(w, h int, rgb8data []byte, pal color.Palette) image.Image
- type Attributes
- type Image
- type Result
Constants ¶
View Source
const ( SPEED_SLOWEST = 1 SPEED_DEFAULT = 3 SPEED_FASTEST = 10 )
Variables ¶
View Source
var ( ErrQualityTooLow = errors.New("Quality too low") ErrValueOutOfRange = errors.New("Value out of range") ErrOutOfMemory = errors.New("Out of memory") ErrNotReady = errors.New("LIQ_NOT_READY") ErrBitmapNotAvailable = errors.New("Bitmap not available") ErrBufferTooSmall = errors.New("Buffer too small") ErrInvalidPointer = errors.New("Invalid pointer") ErrUseAfterFree = errors.New("Use after free") )
Functions ¶
func LibVersion ¶
func LibVersion() string
Types ¶
type Attributes ¶
type Attributes struct {
// contains filtered or unexported fields
}
func NewAttributes ¶
func NewAttributes() (*Attributes, error)
Callers MUST call Release() on the returned object to free memory.
func (*Attributes) Release ¶
func (a *Attributes) Release()
Free memory. Callers must not use this object after Release has been called.
func (*Attributes) SetQuality ¶
func (a *Attributes) SetQuality(minQuality int, maxQuality int) error
func (*Attributes) SetSpeed ¶
func (a *Attributes) SetSpeed(speed int) error
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
Callers must not use i object once Release has been called on the parent Image struct.
func (*Result) GetImageHeight ¶
func (*Result) GetImageWidth ¶
func (*Result) GetPalette ¶
Click to show internal directories.
Click to hide internal directories.