bundle

package
v0.0.0-...-2eec009 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ALPHA              = 0
	DEPTH              = 1
	SPOT_COLOR         = 2
	SELECTION_MASK     = 3
	CMYK_BLACK         = 4
	COLOR_FILTER_ARRAY = 5
	THERMAL            = 6
	NON_OPTIONAL       = 15
	OPTIONAL           = 16
)
View Source
const (
	CODESTREAM_HEADER uint32 = 0x0AFF
)

Variables

View Source
var (
	DEFAULT_UP2 = []float32{
		-0.01716200, -0.03452303, -0.04022174, -0.02921014, -0.00624645,
		0.14111091, 0.28896755, 0.00278718, -0.01610267, 0.56661550,
		0.03777607, -0.01986694, -0.03144731, -0.01185068, -0.00213539}

	DEFAULT_UP4 = []float32{
		-0.02419067, -0.03491987, -0.03693351, -0.03094285, -0.00529785,
		-0.01663432, -0.03556863, -0.03888905, -0.03516850, -0.00989469,
		0.23651958, 0.33392945, -0.01073543, -0.01313181, -0.03556694,
		0.13048175, 0.40103025, 0.03951150, -0.02077584, 0.46914198,
		-0.00209270, -0.01484589, -0.04064806, 0.18942530, 0.56279892,
		0.06674400, -0.02335494, -0.03551682, -0.00754830, -0.02267919,
		-0.02363578, 0.00315804, -0.03399098, -0.01359519, -0.00091653,
		-0.00335467, -0.01163294, -0.01610294, -0.00974088, -0.00191622,
		-0.01095446, -0.03198464, -0.04455121, -0.02799790, -0.00645912,
		0.06390599, 0.22963888, 0.00630981, -0.01897349, 0.67537268,
		0.08483369, -0.02534994, -0.02205197, -0.01667999, -0.00384443}
	DEFAULT_UP8 = []float32{}/* 210 elements not displayed */

)

Functions

func GetICCContext

func GetICCContext(buffer []byte, index int) int

func ValidateExtraChannel

func ValidateExtraChannel(ec int32) bool

Types

type AnimationHeader

type AnimationHeader struct {
	HaveTimeCodes bool
}

func NewAnimationHeader

func NewAnimationHeader(reader *jxlio.Bitreader) (*AnimationHeader, error)

type BitDepthHeader

type BitDepthHeader struct {
	UsesFloatSamples bool
	BitsPerSample    uint32
	ExpBits          uint32
}

func NewBitDepthHeader

func NewBitDepthHeader() *BitDepthHeader

func NewBitDepthHeaderWithReader

func NewBitDepthHeaderWithReader(reader *jxlio.Bitreader) (*BitDepthHeader, error)

type Extensions

type Extensions struct {
	ExtensionsKey uint64
	Payloads      [64][]byte
}

func NewExtensions

func NewExtensions() *Extensions

func NewExtensionsWithReader

func NewExtensionsWithReader(reader *jxlio.Bitreader) (*Extensions, error)

type ExtraChannelInfo

type ExtraChannelInfo struct {
	EcType   int32
	BitDepth BitDepthHeader
	DimShift int32

	AlphaAssociated bool
	// contains filtered or unexported fields
}

func NewExtraChannelInfoWithReader

func NewExtraChannelInfoWithReader(reader *jxlio.Bitreader) (*ExtraChannelInfo, error)

type ImageHeader

type ImageHeader struct {
	Level       int32
	Size        util.Dimension
	Orientation uint32

	PreviewSize     *util.Dimension
	AnimationHeader *AnimationHeader
	BitDepth        *BitDepthHeader

	OrientedWidth       uint32
	OrientedHeight      uint32
	Modular16BitBuffers bool

	ExtraChannelInfo []ExtraChannelInfo
	XybEncoded       bool
	ColorEncoding    *color.ColorEncodingBundle
	AlphaIndices     []int32

	ToneMapping        *color.ToneMapping
	Extensions         *Extensions
	OpsinInverseMatrix *color.OpsinInverseMatrix

	Up2Weights []float32
	Up4Weights []float32
	Up8Weights []float32

	UpWeights [][][][][]float32

	EncodedICC []byte
	// contains filtered or unexported fields
}

func NewImageHeader

func NewImageHeader() *ImageHeader

func ParseImageHeader

func ParseImageHeader(reader *jxlio.Bitreader, level int32) (*ImageHeader, error)

func (*ImageHeader) GetColourChannelCount

func (h *ImageHeader) GetColourChannelCount() int

func (*ImageHeader) GetColourModel

func (h *ImageHeader) GetColourModel() int32

func (*ImageHeader) GetDecodedICC

func (h *ImageHeader) GetDecodedICC() []byte

func (*ImageHeader) GetSize

func (h *ImageHeader) GetSize() util.Dimension

func (*ImageHeader) GetTotalChannelCount

func (h *ImageHeader) GetTotalChannelCount() int

func (*ImageHeader) GetUpWeights

func (h *ImageHeader) GetUpWeights() ([][][][][]float32, error)

func (*ImageHeader) HasAlpha

func (h *ImageHeader) HasAlpha() bool

Jump to

Keyboard shortcuts

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