native

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: BSD-2-Clause, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode added in v1.1.0

func Encode(src []byte, opts EncodeOptions) ([]byte, error)

func Version

func Version() (string, error)

Types

type DecodeResult

type DecodeResult struct {
	Output      []byte
	Width       int
	Height      int
	Components  int
	Precision   int
	IsSigned    bool
	ColourSpace int
}

func Decode

func Decode(data []byte, codec int) (*DecodeResult, error)

type EncodeOptions added in v1.1.0

type EncodeOptions struct {
	Columns         int
	Rows            int
	SamplesPerPixel int
	BitsStored      int
	IsSigned        bool
	ColourSpace     int
	UseMCT          bool
	Codec           int
	// CompressionRatios empty => lossless.
	CompressionRatios []float64
}

EncodeOptions configures JPEG 2000 encoding.

type ImageParams

type ImageParams struct {
	Width       int
	Height      int
	Components  int
	Precision   int
	IsSigned    bool
	ColourSpace int
}

func GetParameters

func GetParameters(data []byte, codec int) (*ImageParams, error)

type StatusError

type StatusError struct {
	Op   string
	Code int
}

func (*StatusError) Error

func (e *StatusError) Error() string

Jump to

Keyboard shortcuts

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