Documentation
¶
Index ¶
- Constants
- Variables
- func GetLibraryVersion() int
- func GetLibraryVersionString() string
- func GoImageToRgba32(im image.Image) []byte
- func License() string
- func Rgb8PaletteToGoImage(w, h int, rgb8data []byte, pal color.Palette) image.Image
- type Attributes
- func (this *Attributes) CreateHistogram() *Histogram
- func (this *Attributes) GetMaxColors() int
- func (this *Attributes) GetMaxQuality() int
- func (this *Attributes) GetMinOpacity() int
- func (this *Attributes) GetMinPosterization() int
- func (this *Attributes) GetMinQuality() int
- func (this *Attributes) GetSpeed() int
- func (this *Attributes) Release()
- func (this *Attributes) SetLastIndexTransparent(is_last int)
- func (this *Attributes) SetMaxColors(colors int) error
- func (this *Attributes) SetMinOpacity(min int) error
- func (this *Attributes) SetMinPosterization(bits int) error
- func (this *Attributes) SetQuality(minimum, maximum int) error
- func (this *Attributes) SetSpeed(speed int) error
- type Histogram
- type Image
- type Result
- func (this *Result) GetImageHeight() int
- func (this *Result) GetImageWidth() int
- func (this *Result) GetOutputGamma() float64
- func (this *Result) GetPalette() color.Palette
- func (this *Result) GetQuantizationError() float64
- func (this *Result) GetQuantizationQuality() float64
- func (this *Result) GetRemappingError() float64
- func (this *Result) GetRemappingQuality() float64
- func (this *Result) Release()
- func (this *Result) SetDitheringLevel(dither_level float32) error
- func (this *Result) SetOutputGamma(gamma float64) error
- func (this *Result) SetOutputImage(img *Image)
- func (this *Result) WriteRemappedImage() ([]byte, error)
Constants ¶
View Source
const ( COLORS_MIN = 2 COLORS_MAX = 256 )
View Source
const ( QUALITY_MIN = 0 QUALITY_MAX = 100 )
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") ErrAborted = errors.New("Aborted") 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 GetLibraryVersion ¶
func GetLibraryVersion() int
func GetLibraryVersionString ¶
func GetLibraryVersionString() string
func GoImageToRgba32 ¶
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) CreateHistogram ¶
func (this *Attributes) CreateHistogram() *Histogram
func (*Attributes) GetMaxColors ¶
func (this *Attributes) GetMaxColors() int
func (*Attributes) GetMaxQuality ¶
func (this *Attributes) GetMaxQuality() int
func (*Attributes) GetMinOpacity ¶
func (this *Attributes) GetMinOpacity() int
func (*Attributes) GetMinPosterization ¶
func (this *Attributes) GetMinPosterization() int
func (*Attributes) GetMinQuality ¶
func (this *Attributes) GetMinQuality() int
func (*Attributes) GetSpeed ¶
func (this *Attributes) GetSpeed() int
func (*Attributes) Release ¶
func (this *Attributes) Release()
Free memory. Callers must not use this object after Release has been called.
func (*Attributes) SetLastIndexTransparent ¶
func (this *Attributes) SetLastIndexTransparent(is_last int)
func (*Attributes) SetMaxColors ¶
func (this *Attributes) SetMaxColors(colors int) error
func (*Attributes) SetMinOpacity ¶
func (this *Attributes) SetMinOpacity(min int) error
func (*Attributes) SetMinPosterization ¶
func (this *Attributes) SetMinPosterization(bits int) error
func (*Attributes) SetQuality ¶
func (this *Attributes) SetQuality(minimum, maximum int) error
func (*Attributes) SetSpeed ¶
func (this *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 this object once Release has been called on the parent Image struct.
func (*Result) GetImageHeight ¶
func (*Result) GetImageWidth ¶
func (*Result) GetOutputGamma ¶
func (*Result) GetPalette ¶
func (*Result) GetQuantizationError ¶
func (*Result) GetQuantizationQuality ¶
func (*Result) GetRemappingError ¶
func (*Result) GetRemappingQuality ¶
func (*Result) Release ¶
func (this *Result) Release()
Free memory. Callers must not use this object after Release has been called.
func (*Result) SetDitheringLevel ¶
func (*Result) SetOutputGamma ¶
func (*Result) SetOutputImage ¶
func (*Result) WriteRemappedImage ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.