decoder

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package decoder provides format-specific image decoders.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JPEG

type JPEG struct{}

JPEG decodes JPEG images using the standard library.

func NewJPEG

func NewJPEG() *JPEG

NewJPEG returns an initialised JPEG decoder.

func (*JPEG) CanDecode

func (j *JPEG) CanDecode(format core.Format) bool

func (*JPEG) Decode

func (j *JPEG) Decode(ctx context.Context, r io.Reader) (*core.ImageData, error)

type PNG

type PNG struct{}

PNG decodes PNG images using the standard library.

func NewPNG

func NewPNG() *PNG

func (*PNG) CanDecode

func (p *PNG) CanDecode(format core.Format) bool

func (*PNG) Decode

func (p *PNG) Decode(ctx context.Context, r io.Reader) (*core.ImageData, error)

type WebP

type WebP struct{}

WebP decodes WebP images using golang.org/x/image/webp. NOTE: golang.org/x/image/webp only supports lossy WebP decoding. For lossless or animated WebP, integrate libvips or google/go-webp.

func NewWebP

func NewWebP() *WebP

func (*WebP) CanDecode

func (w *WebP) CanDecode(format core.Format) bool

func (*WebP) Decode

func (w *WebP) Decode(ctx context.Context, r io.Reader) (*core.ImageData, error)

Jump to

Keyboard shortcuts

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