format

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUint16

func BytesToUint16(a, b byte) uint16

BytesToUint16 merges a & b (big endian order) into an uint16 value.

func FromBytes

func FromBytes(endianness binary.ByteOrder, pixel []byte) (float64, float64, float64)

FromBytes converts given bytes to their float64 values according to the endianness.

func FromRadianceBytes

func FromRadianceBytes(b0, b1, b2, e byte, exposure float64) (bb0, bb1, bb2 float64)

FromRadianceBytes converts Radiance RGBE/XYZE color space to RGB/XYZ color space.

func LogLuvToXYZ

func LogLuvToXYZ(SLe, le, ue, ve byte) (x, y, z float64)

LogLuvToXYZ converts LogLuv bytes to XYZ floats 64 bits.

 1       15           8        8
|-+---------------|--------+--------|
 S     Le+le          ue       ve

func SLeToY

func SLeToY(sle uint16) float64

SLeToY converts Le with S to Y.

 1       15
|-+---------------|
 S       Le

func ToBytes

func ToBytes(endianness binary.ByteOrder, f1, f2, f3 float64) []byte

ToBytes converts given float64 values to their bytes representation according to the endianness.

func ToRadianceBytes

func ToRadianceBytes(f1, f2, f3 float64) []byte

ToRadianceBytes converts RGB/XYZ color space to Radiance RGBE/XYZE (4 bytes slice).

func Uint16ToBytes

func Uint16ToBytes(v uint16) (byte, byte)

Uint16ToBytes splits v into 2 bytes (big endian order).

func XYZToLogLuv

func XYZToLogLuv(x, y, z float64) []byte

XYZToLogLuv converts XYZ floats 64 bits to LogLuv bytes.

 1       15           8        8
|-+---------------|--------+--------|
 S     Le+le          ue       ve

func YToSLe

func YToSLe(y float64) uint16

YToSLe converts Y to Le with S.

 1       15
|-+---------------|
 S       Le

Types

This section is empty.

Jump to

Keyboard shortcuts

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