Documentation ¶
Overview ¶
Package gube implements functions to work with .cube LUT files.
Index ¶
- Constants
- Variables
- type Gube
- type GubeImpl
- func (gi *GubeImpl) Domain() (RGB, RGB)
- func (gi *GubeImpl) LookUp(r float64, g float64, b float64) (RGB, error)
- func (gi *GubeImpl) Name() string
- func (gi *GubeImpl) ProcessImage(input image.Image) (image.Image, error)
- func (gi *GubeImpl) TableData1D() *[]RGB
- func (gi *GubeImpl) TableData3D() *[][][]RGB
- func (gi *GubeImpl) TableSize() int64
- func (gi *GubeImpl) TableType() int64
- type RGB
Constants ¶
View Source
const ( // LUT_INVALID represents an invalid LUT type. LUT_INVALID = iota // LUT_1D is a LUT with 1D table data. LUT_1D // LUT_3D is a LUT with 3D table data. LUT_3D )
Variables ¶
View Source
var ( // ErrOutsideOfDomain is the error returned when trying to look up values outside of the domain. ErrOutsideOfDomain = errors.New("value is outside of domain limits") // ErrInvalidLutType is the error returned when the LUT type is not a supported one. ErrInvalidLutType = errors.New("invalid LUT type") // ErrInvalidLutData is the error returned when the parser encounters invalid data. ErrInvalidLutData = errors.New("invalid LUT data") )
Functions ¶
This section is empty.
Types ¶
type Gube ¶
type Gube interface { // ProcessImage applies the LUT to the input and returns a new image with the changes. ProcessImage(input image.Image) (image.Image, error) // LookUp returns the transformed RGB value based on the LUT. LookUp(r float64, g float64, b float64) (RGB, error) // Name returns the name of this LUT. Name() string // TableType returns the table type (1D or 3D). TableType() int64 // TableSize returns the number of entries in this LUT. TableSize() int64 // TableData1D returns the table data for 1D LUTs. TableData1D() *[]RGB // TableData3D returns the table data for 3D LUTs. TableData3D() *[][][]RGB // Domain returns the min and max domain values for this LUT. Domain() (RGB, RGB) }
Gube defines the methods used to work with .cube LUT files.
type GubeImpl ¶
type GubeImpl struct {
// contains filtered or unexported fields
}
func NewFromReader ¶
NewFromReader returns a Gube instance created from the reader data.
func (*GubeImpl) ProcessImage ¶
func (*GubeImpl) TableData1D ¶
func (*GubeImpl) TableData3D ¶
Click to show internal directories.
Click to hide internal directories.