Documentation ¶
Index ¶
- Constants
- Variables
- func AppendNullTerminatedString[T ~string](b []byte, s T) []byte
- func ChunkCount(dataWindow Box2i, compression Compression) int
- func Read(in io.Reader, data any) error
- func ReadAttributeName(in io.Reader, target *AttributeName) error
- func ReadAttributeType(in io.Reader, target *AttributeType) error
- func ReadBox2i(in io.Reader, target *Box2i) error
- func ReadChannelList(in io.Reader, target *ChannelList) error
- func ReadCompression(in io.Reader, target *Compression) error
- func ReadHeader(in io.Reader, target *Header) error
- func ReadLineOrder(in io.Reader, target *LineOrder) error
- func ReadMagic(in io.Reader, target *Magic) error
- func ReadNullTerminatedString[T ~string](in io.Reader, target *T) error
- func ReadOffsets(in io.Reader, chunkCount int) error
- func ReadScanLineBlock(in io.Reader, dataWindow Box2i, compression Compression, ...) error
- func ReadVersion(in io.Reader, target *Version) error
- func Write(w io.Writer, data any) error
- func WriteAttribute(w io.Writer, n AttributeName, t AttributeType, a any) error
- func WriteAttributeBytes(w io.Writer, n AttributeName, t AttributeType, s int32, b []byte) error
- func WriteAttributeHeader(w io.Writer, n AttributeName, t AttributeType, s int32) error
- func WriteMagic(w io.Writer) error
- func WriteNullTerminatedString[T ~string](w io.Writer, s T) error
- type AttributeName
- type AttributeType
- type Box2i
- type BytesAttribute
- type Channel
- type ChannelList
- type Compression
- type Compressor
- type Decompressor
- type Flag
- type Header
- type LineOrder
- type Magic
- type PixelData
- type PixelType
- type V2F
- type Version
Constants ¶
View Source
const (
Extension = "exr"
)
View Source
const (
SupportedVersion = 2
)
Variables ¶
View Source
var (
MagicSequence = [4]byte{0x76, 0x2F, 0x31, 0x01}
)
Functions ¶
func ChunkCount ¶
func ChunkCount(dataWindow Box2i, compression Compression) int
func ReadAttributeName ¶
func ReadAttributeName(in io.Reader, target *AttributeName) error
func ReadAttributeType ¶
func ReadAttributeType(in io.Reader, target *AttributeType) error
func ReadChannelList ¶
func ReadChannelList(in io.Reader, target *ChannelList) error
func ReadCompression ¶
func ReadCompression(in io.Reader, target *Compression) error
func ReadScanLineBlock ¶
func ReadScanLineBlock(in io.Reader, dataWindow Box2i, compression Compression, decompressor Decompressor, dataChannels []PixelData) error
func WriteAttribute ¶
func WriteAttribute(w io.Writer, n AttributeName, t AttributeType, a any) error
func WriteAttributeBytes ¶
func WriteAttributeBytes(w io.Writer, n AttributeName, t AttributeType, s int32, b []byte) error
func WriteAttributeHeader ¶
func WriteAttributeHeader(w io.Writer, n AttributeName, t AttributeType, s int32) error
WriteAttributeHeader writes an attribute minus its data. It's used for when the size is known but the data is not available as a single []byte
func WriteMagic ¶
Types ¶
type AttributeName ¶
type AttributeName string
const ( AttributeNameChannels AttributeName = "channels" AttributeNameCompression AttributeName = "compression" AttributeNameDataWindow AttributeName = "dataWindow" AttributeNameDisplayWindow AttributeName = "displayWindow" AttributeNameLineOrder AttributeName = "lineOrder" AttributeNamePixelAspectRatio AttributeName = "pixelAspectRatio" AttributeNameScreenWindowCenter AttributeName = "screenWindowCenter" AttributeNameScreenWindowWidth AttributeName = "screenWindowWidth" )
type AttributeType ¶
type AttributeType string
const ( AttributeTypeChannelList AttributeType = "chlist" AttributeTypeCompression AttributeType = "compression" AttributeTypeBox2i AttributeType = "box2i" AttributeTypeLineOrder AttributeType = "lineOrder" AttributeTypeFloat AttributeType = "float" AttributeTypeV2f AttributeType = "v2f" )
type Box2i ¶
func Box2iFromRect ¶
type BytesAttribute ¶
type BytesAttribute interface {
Bytes() []byte
}
type ChannelList ¶
type ChannelList []Channel
func (ChannelList) Bytes ¶
func (l ChannelList) Bytes() []byte
type Compression ¶
type Compression uint8
const ( CompressionNone Compression = 0 CompressionRLE Compression = 1 CompressionZIPS Compression = 2 CompressionZIP Compression = 3 CompressionPIZ Compression = 4 CompressionPXR24 Compression = 5 CompressionB44 Compression = 6 CompressionB44A Compression = 7 )
func (Compression) Bytes ¶
func (c Compression) Bytes() []byte
func (Compression) LineCount ¶
func (c Compression) LineCount() int
func (Compression) String ¶
func (c Compression) String() string
type Compressor ¶
func NewNopCompressor ¶
func NewNopCompressor() Compressor
func NewZipCompressor ¶
func NewZipCompressor() Compressor
type Decompressor ¶
func NewNopDecompressor ¶
func NewNopDecompressor() Decompressor
func NewZipDecompressor ¶
func NewZipDecompressor() Decompressor
type Header ¶
type Header struct { Channels ChannelList Compression Compression DataWindow Box2i DisplayWindow Box2i LineOrder LineOrder }
type PixelData ¶
type PixelData interface { LineSize() int32 ReadLine(in io.Reader, y int32) error WriteLine(w io.Writer, y int32) error Float32(x, y int) float32 Set(x, y int, v float32) }
func NewFloat16PixelData ¶
func NewFloat32PixelData ¶
func NewNopPixelData ¶
func NewUint32PixelData ¶
Click to show internal directories.
Click to hide internal directories.