Versions in this module Expand all Collapse all v0 v0.3.0 Feb 7, 2024 v0.2.0 Feb 7, 2024 Changes in this version + func Decode(r io.Reader) (image.Image, error) + func DecodeConfig(r io.Reader) (image.Config, error) + func Encode(w io.Writer, img image.Image, c *Config) (err error) v0.1.0 Feb 7, 2024 Changes in this version + const PreprocessingNone + const PreprocessingPseudoRandomDithering + const PreprocessingSegmentSmooth + var RGBModel = color.ModelFunc(rgbModel) + func DecodeRGBA(data []byte, options *DecoderOptions) (img *image.RGBA, err error) + func EncodeGray(w io.Writer, p *image.Gray, c *Config) (err error) + func EncodeRGBA(w io.Writer, img image.Image, c *Config) (err error) + func EncodeYUVA(w io.Writer, img *YUVAImage, c *Config) (err error) + func GetDecoderVersion() (v int) + func GetDestinationManagerMapLen() int + func GetInfo(data []byte) (width, height int) + type Animation struct + Image []*image.RGBA + Timestamp []int + type AnimationDecoder struct + func NewAnimationDecoder(data []byte) (*AnimationDecoder, error) + func (ad *AnimationDecoder) Close() + func (ad *AnimationDecoder) Decode() (*Animation, error) + func (ad *AnimationDecoder) GetInfo() (*AnimationInfo, error) + type AnimationEncoder struct + func NewAnimationEncoder(width, height, kmin, kmax int) (*AnimationEncoder, error) + func (ae *AnimationEncoder) AddFrame(img image.Image, duration time.Duration) error + func (ae *AnimationEncoder) Assemble() ([]byte, error) + func (ae *AnimationEncoder) Close() + type AnimationInfo struct + BackgroundColor color.RGBA + CanvasHeight int + CanvasWidth int + FrameCount int + LoopCount int + type BitstreamFeatures struct + Format int + HasAlpha bool + HasAnimation bool + Height int + Width int + func GetFeatures(data []byte) (f *BitstreamFeatures, err error) + type ColorSpace int + const YUV420 + const YUV420A + type Config struct + func ConfigLosslessPreset(level int) (*Config, error) + func ConfigPreset(preset Preset, quality float32) (*Config, error) + func (c *Config) AlphaCompression() int + func (c *Config) AlphaFiltering() int + func (c *Config) AlphaQuality() int + func (c *Config) AutoFilter() bool + func (c *Config) EmulateJPEGSize() bool + func (c *Config) Exact() bool + func (c *Config) FilterSharpness() int + func (c *Config) FilterStrength() int + func (c *Config) FilterType() FilterType + func (c *Config) ImageHint() ImageHint + func (c *Config) Lossless() bool + func (c *Config) LowMemory() bool + func (c *Config) Method() int + func (c *Config) NearLossless() int + func (c *Config) PartitionLimit() int + func (c *Config) Partitions() int + func (c *Config) Pass() int + func (c *Config) Preprocessing() Preprocessing + func (c *Config) Quality() float32 + func (c *Config) SNSStrength() int + func (c *Config) Segments() int + func (c *Config) SetAlphaCompression(v int) + func (c *Config) SetAlphaFiltering(v int) + func (c *Config) SetAlphaQuality(v int) + func (c *Config) SetAutoFilter(v bool) + func (c *Config) SetEmulateJPEGSize(v bool) + func (c *Config) SetExact(v bool) + func (c *Config) SetFilterSharpness(v int) + func (c *Config) SetFilterStrength(v int) + func (c *Config) SetFilterType(v FilterType) + func (c *Config) SetImageHint(v ImageHint) + func (c *Config) SetLossless(v bool) + func (c *Config) SetLowMemory(v bool) + func (c *Config) SetMethod(v int) + func (c *Config) SetNearLossless(v int) + func (c *Config) SetPartitionLimit(v int) + func (c *Config) SetPartitions(v int) + func (c *Config) SetPass(v int) + func (c *Config) SetPreprocessing(v Preprocessing) + func (c *Config) SetQuality(v float32) + func (c *Config) SetSNSStrength(v int) + func (c *Config) SetSegments(v int) + func (c *Config) SetTargetPSNR(v float32) + func (c *Config) SetThreadLevel(v int) + func (c *Config) TargetPSNR() float32 + func (c *Config) ThreadLevel() int + type DecoderOptions struct + AlphaDitheringStrength int + BypassFiltering bool + Crop image.Rectangle + DitheringStrength int + Flip bool + NoFancyUpsampling bool + Scale image.Rectangle + UseThreads bool + type FilterType int + const SimpleFilter + const StrongFilter + type ImageHint int + const HintDefault + const HintGraph + const HintLast + const HintPhoto + const HintPicture + type Preprocessing int + type Preset int + const PresetDefault + const PresetDrawing + const PresetIcon + const PresetPhoto + const PresetPicture + const PresetText + type RGB struct + B uint8 + G uint8 + R uint8 + func (c RGB) RGBA() (r, g, b, a uint32) + type RGBImage struct + Pix []uint8 + Rect image.Rectangle + Stride int + func NewRGBImage(r image.Rectangle) *RGBImage + func (p *RGBImage) At(x, y int) color.Color + func (p *RGBImage) Bounds() image.Rectangle + func (p *RGBImage) ColorModel() color.Model + func (p *RGBImage) RGBAAt(x, y int) color.RGBA + type YUVAImage struct + A []uint8 + AStride int + CStride int + Cb []uint8 + ColorSpace ColorSpace + Cr []uint8 + Rect image.Rectangle + Y []uint8 + YStride int + func DecodeYUVA(data []byte, options *DecoderOptions) (img *YUVAImage, err error) + func NewYUVAImage(r image.Rectangle, c ColorSpace) (image *YUVAImage)