native

package
v1.1.1 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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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