icc

package
v1.8.20 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package icc provides support for working with ICC colour profile data.

Index

Constants

View Source
const FLOAT_EQUALITY_THRESHOLD = 1. / math.MaxUint16

We consider two floats equal if they result in the same uint16 representation

View Source
const LAB_MFT2_ENCODING_CORRECTION = 65535.0 / 65280.0
View Source
const LAB_MFT2_ENCODING_CORRECTION_INVERSE = 65280.0 / 65535.0
View Source
const MAX_ENCODEABLE_XYZ = 1.0 + 32767.0/32768.0
View Source
const MAX_ENCODEABLE_XYZ_INVERSE = 1.0 / (MAX_ENCODEABLE_XYZ)

Variables

View Source
var Points_for_transformer_comparison3 = sync.OnceValue(func() []unit_float {
	return points_for_transformer_comparison(3, 16)
})
View Source
var Points_for_transformer_comparison4 = sync.OnceValue(func() []unit_float {
	return points_for_transformer_comparison(4, 16)
})
View Source
var SRGBCurve = sync.OnceValue(func() *SplitCurve {
	ans := &SplitCurve{g: 2.4, a: 1 / 1.055, b: 0.055 / 1.055, c: 1 / 12.92, d: 0.0031308 * 12.92}
	ans.Prepare()
	return ans
})
View Source
var SRGBCurveInverseTransformer = sync.OnceValue(func() Curves {
	return NewInverseCurveTransformer("TRC", SRGBCurve(), SRGBCurve(), SRGBCurve())
})
View Source
var SRGBCurveTransformer = sync.OnceValue(func() Curves {
	return NewCurveTransformer("sRGB curve", SRGBCurve(), SRGBCurve(), SRGBCurve())
})
View Source
var Srgb_xyz_profile_data []byte

Functions

func Dot added in v1.8.2

func Dot(v1, v2 [3]unit_float) unit_float

func IfElse added in v1.8.2

func IfElse[T any](condition bool, if_val T, else_val T) T

Types

type AsMatrix3 added in v1.8.2

type AsMatrix3 interface {
	AsMatrix3() *Matrix3
}

type BlackPointCorrection added in v1.8.2

type BlackPointCorrection struct {
	// contains filtered or unexported fields
}

func NewBlackPointCorrection added in v1.8.2

func NewBlackPointCorrection(in_whitepoint, in_blackpoint, out_blackpoint XYZType) *BlackPointCorrection

func (BlackPointCorrection) IOSig added in v1.8.2

func (n BlackPointCorrection) IOSig() (int, int)

func (*BlackPointCorrection) Iter added in v1.8.2

func (n *BlackPointCorrection) Iter(f func(ChannelTransformer) bool)

func (*BlackPointCorrection) String added in v1.8.2

func (c *BlackPointCorrection) String() string

func (*BlackPointCorrection) Transform added in v1.8.2

func (c *BlackPointCorrection) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*BlackPointCorrection) TransformGeneral added in v1.8.2

func (m *BlackPointCorrection) TransformGeneral(o, i []unit_float)

type CLUT added in v1.8.2

type CLUT interface {
	ChannelTransformer
	Samples() []unit_float
}

type ChannelTransformer

type ChannelTransformer interface {
	Transform(r, g, b unit_float) (x, y, z unit_float)
	TransformGeneral(out, in []unit_float)
	IOSig() (num_inputs, num_outputs int)
	// Should yield only itself unless it is a container, in which case it should yield its contained transforms
	Iter(func(ChannelTransformer) bool)
	String() string
}

type ColorSpace

type ColorSpace uint32
const (
	ColorSpaceXYZ     ColorSpace = 0x58595A20 // 'XYZ '
	ColorSpaceLab     ColorSpace = 0x4C616220 // 'Lab '
	ColorSpaceLuv     ColorSpace = 0x4C757620 // 'Luv '
	ColorSpaceYCbCr   ColorSpace = 0x59436272 // 'YCbr'
	ColorSpaceYxy     ColorSpace = 0x59787920 // 'Yxy '
	ColorSpaceRGB     ColorSpace = 0x52474220 // 'RGB '
	ColorSpaceGray    ColorSpace = 0x47524159 // 'Gray'
	ColorSpaceHSV     ColorSpace = 0x48535620 // 'HSV '
	ColorSpaceHLS     ColorSpace = 0x484C5320 // 'HLS '
	ColorSpaceCMYK    ColorSpace = 0x434D594B // 'CMYK'
	ColorSpaceCMY     ColorSpace = 0x434D5920 // 'CMY '
	ColorSpace2Color  ColorSpace = 0x32434C52 // '2CLR'
	ColorSpace3Color  ColorSpace = 0x33434C52 // '3CLR'
	ColorSpace4Color  ColorSpace = 0x34434C52 // '4CLR'
	ColorSpace5Color  ColorSpace = 0x35434C52 // '5CLR'
	ColorSpace6Color  ColorSpace = 0x36434C52 // '6CLR'
	ColorSpace7Color  ColorSpace = 0x37434C52 // '7CLR'
	ColorSpace8Color  ColorSpace = 0x38434C52 // '8CLR'
	ColorSpace9Color  ColorSpace = 0x39434C52 // '9CLR'
	ColorSpace10Color ColorSpace = 0x41434C52 // 'ACLR'
	ColorSpace11Color ColorSpace = 0x42434C52 // 'BCLR'
	ColorSpace12Color ColorSpace = 0x43434C52 // 'CCLR'
	ColorSpace13Color ColorSpace = 0x44434C52 // 'DCLR'
	ColorSpace14Color ColorSpace = 0x45434C52 // 'ECLR'
	ColorSpace15Color ColorSpace = 0x46434C52 // 'FCLR'
)

func (ColorSpace) BlackPoint added in v1.8.2

func (cs ColorSpace) BlackPoint() []unit_float

func (ColorSpace) String

func (cs ColorSpace) String() string

type ComplexCurve added in v1.8.2

type ComplexCurve struct {
	// contains filtered or unexported fields
}

func (*ComplexCurve) InverseTransform added in v1.8.2

func (c *ComplexCurve) InverseTransform(y unit_float) unit_float

func (*ComplexCurve) IsSRGB added in v1.8.2

func (c *ComplexCurve) IsSRGB() bool

func (*ComplexCurve) Prepare added in v1.8.2

func (c *ComplexCurve) Prepare() error

func (*ComplexCurve) String added in v1.8.2

func (c *ComplexCurve) String() string

func (*ComplexCurve) Transform added in v1.8.2

func (c *ComplexCurve) Transform(x unit_float) unit_float

type ConditionalCCurve added in v1.8.2

type ConditionalCCurve struct {
	// contains filtered or unexported fields
}

func (*ConditionalCCurve) InverseTransform added in v1.8.2

func (c *ConditionalCCurve) InverseTransform(y unit_float) unit_float

func (*ConditionalCCurve) Prepare added in v1.8.2

func (c *ConditionalCCurve) Prepare() error

func (*ConditionalCCurve) String added in v1.8.2

func (c *ConditionalCCurve) String() string

func (*ConditionalCCurve) Transform added in v1.8.2

func (c *ConditionalCCurve) Transform(x unit_float) unit_float

type ConditionalZeroCurve added in v1.8.2

type ConditionalZeroCurve struct {
	// contains filtered or unexported fields
}

func (*ConditionalZeroCurve) InverseTransform added in v1.8.2

func (c *ConditionalZeroCurve) InverseTransform(y unit_float) unit_float

func (*ConditionalZeroCurve) Prepare added in v1.8.2

func (c *ConditionalZeroCurve) Prepare() error

func (*ConditionalZeroCurve) String added in v1.8.2

func (c *ConditionalZeroCurve) String() string

func (*ConditionalZeroCurve) Transform added in v1.8.2

func (c *ConditionalZeroCurve) Transform(x unit_float) unit_float

type Curve1D added in v1.8.2

type Curve1D interface {
	Transform(x unit_float) unit_float
	InverseTransform(x unit_float) unit_float
	Prepare() error
	String() string
}

type CurveTransformer added in v1.8.2

type CurveTransformer struct {
	// contains filtered or unexported fields
}

func (*CurveTransformer) Curves added in v1.8.2

func (c *CurveTransformer) Curves() []Curve1D

func (CurveTransformer) IOSig added in v1.8.2

func (c CurveTransformer) IOSig() (int, int)

func (*CurveTransformer) Iter added in v1.8.2

func (c *CurveTransformer) Iter(f func(ChannelTransformer) bool)

func (CurveTransformer) String added in v1.8.2

func (c CurveTransformer) String() string

func (CurveTransformer) Transform added in v1.8.2

func (c CurveTransformer) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (CurveTransformer) TransformGeneral added in v1.8.2

func (c CurveTransformer) TransformGeneral(o, i []unit_float)

type CurveTransformer3 added in v1.8.2

type CurveTransformer3 struct {
	// contains filtered or unexported fields
}

func (*CurveTransformer3) Curves added in v1.8.2

func (c *CurveTransformer3) Curves() []Curve1D

func (CurveTransformer3) IOSig added in v1.8.2

func (c CurveTransformer3) IOSig() (int, int)

func (*CurveTransformer3) Iter added in v1.8.2

func (c *CurveTransformer3) Iter(f func(ChannelTransformer) bool)

func (CurveTransformer3) String added in v1.8.2

func (c CurveTransformer3) String() string

func (CurveTransformer3) Transform added in v1.8.2

func (c CurveTransformer3) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (CurveTransformer3) TransformGeneral added in v1.8.2

func (m CurveTransformer3) TransformGeneral(o, i []unit_float)

type Curves added in v1.8.2

type Curves interface {
	ChannelTransformer
	Curves() []Curve1D
}

func NewCurveTransformer added in v1.8.2

func NewCurveTransformer(name string, curves ...Curve1D) Curves

func NewInverseCurveTransformer added in v1.8.2

func NewInverseCurveTransformer(name string, curves ...Curve1D) Curves

type Debug_callback added in v1.8.2

type Debug_callback = func(r, g, b, x, y, z unit_float, t ChannelTransformer)

type DescriptionTag

type DescriptionTag struct {
	ASCII   string
	Unicode string
	Script  string
}

func (DescriptionTag) BestGuessValue

func (d DescriptionTag) BestGuessValue() string

type DeviceClass

type DeviceClass uint32
const (
	DeviceClassInput      DeviceClass = 0x73636E72 // 'scnr'
	DeviceClassDisplay    DeviceClass = 0x6D6E7472 // 'mntr'
	DeviceClassOutput     DeviceClass = 0x70727472 // 'prtr'
	DeviceClassLink       DeviceClass = 0x6C696E6B // 'link'
	DeviceClassColorSpace DeviceClass = 0x73706163 // 'spac'
	DeviceClassAbstract   DeviceClass = 0x61627374 // 'abst'
	DeviceClassNamedColor DeviceClass = 0x6E6D636C // 'nmcl'
)

func (DeviceClass) String

func (dc DeviceClass) String() string

type GammaCurve added in v1.8.2

type GammaCurve struct {
	// contains filtered or unexported fields
}

func (GammaCurve) InverseTransform added in v1.8.2

func (c GammaCurve) InverseTransform(x unit_float) unit_float

func (*GammaCurve) Prepare added in v1.8.2

func (c *GammaCurve) Prepare() error

func (GammaCurve) String added in v1.8.2

func (c GammaCurve) String() string

func (GammaCurve) Transform added in v1.8.2

func (c GammaCurve) Transform(x unit_float) unit_float

type General_debug_callback added in v1.8.2

type General_debug_callback = func(in, out []unit_float, t ChannelTransformer)
type Header struct {
	ProfileSize            uint32
	PreferredCMM           Signature
	Version                Version
	DeviceClass            DeviceClass
	DataColorSpace         ColorSpace
	ProfileConnectionSpace ColorSpace
	CreatedAtRaw           [6]uint16
	FileSignature          Signature
	PrimaryPlatform        PrimaryPlatform
	Flags                  uint32
	DeviceManufacturer     Signature
	DeviceModel            Signature
	DeviceAttributes       uint64
	RenderingIntent        RenderingIntent
	PCSIlluminant          [12]uint8
	ProfileCreator         Signature
	ProfileID              [16]byte
	Reserved               [28]byte
}

func (Header) CreatedAt

func (h Header) CreatedAt() time.Time

func (Header) DependsOnEmbeddedData

func (h Header) DependsOnEmbeddedData() bool

func (Header) Embedded

func (h Header) Embedded() bool

func (Header) ParsedPCSIlluminant added in v1.8.2

func (h Header) ParsedPCSIlluminant() XYZType

func (Header) String

func (h Header) String() string

type IdentityCurve added in v1.8.2

type IdentityCurve int

func (IdentityCurve) InverseTransform added in v1.8.2

func (c IdentityCurve) InverseTransform(x unit_float) unit_float

func (IdentityCurve) Prepare added in v1.8.2

func (c IdentityCurve) Prepare() error

func (IdentityCurve) String added in v1.8.2

func (c IdentityCurve) String() string

func (IdentityCurve) Transform added in v1.8.2

func (c IdentityCurve) Transform(x unit_float) unit_float

type IdentityMatrix added in v1.8.2

type IdentityMatrix int

func (*IdentityMatrix) AsMatrix3 added in v1.8.2

func (m *IdentityMatrix) AsMatrix3() *Matrix3

func (*IdentityMatrix) IOSig added in v1.8.2

func (c *IdentityMatrix) IOSig() (int, int)

func (*IdentityMatrix) Iter added in v1.8.2

func (c *IdentityMatrix) Iter(f func(ChannelTransformer) bool)

func (*IdentityMatrix) String added in v1.8.2

func (c *IdentityMatrix) String() string

func (IdentityMatrix) Transform added in v1.8.2

func (m IdentityMatrix) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (IdentityMatrix) TransformGeneral added in v1.8.2

func (m IdentityMatrix) TransformGeneral(o, i []unit_float)

type InverseCurveTransformer added in v1.8.2

type InverseCurveTransformer struct {
	// contains filtered or unexported fields
}

func (*InverseCurveTransformer) Curves added in v1.8.2

func (c *InverseCurveTransformer) Curves() []Curve1D

func (InverseCurveTransformer) IOSig added in v1.8.2

func (c InverseCurveTransformer) IOSig() (int, int)

func (*InverseCurveTransformer) Iter added in v1.8.2

func (InverseCurveTransformer) String added in v1.8.2

func (c InverseCurveTransformer) String() string

func (InverseCurveTransformer) Transform added in v1.8.2

func (c InverseCurveTransformer) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (InverseCurveTransformer) TransformGeneral added in v1.8.2

func (c InverseCurveTransformer) TransformGeneral(o, i []unit_float)

type InverseCurveTransformer3 added in v1.8.2

type InverseCurveTransformer3 struct {
	// contains filtered or unexported fields
}

func (*InverseCurveTransformer3) Curves added in v1.8.2

func (c *InverseCurveTransformer3) Curves() []Curve1D

func (InverseCurveTransformer3) IOSig added in v1.8.2

func (c InverseCurveTransformer3) IOSig() (int, int)

func (*InverseCurveTransformer3) Iter added in v1.8.2

func (InverseCurveTransformer3) String added in v1.8.2

func (c InverseCurveTransformer3) String() string

func (InverseCurveTransformer3) Transform added in v1.8.2

func (c InverseCurveTransformer3) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (InverseCurveTransformer3) TransformGeneral added in v1.8.2

func (m InverseCurveTransformer3) TransformGeneral(o, i []unit_float)

type IsSRGB added in v1.8.2

type IsSRGB interface {
	IsSRGB() bool
}

type LABToNormalized added in v1.8.2

type LABToNormalized int

func NewLABToNormalized added in v1.8.2

func NewLABToNormalized() *LABToNormalized

func (LABToNormalized) IOSig added in v1.8.2

func (n LABToNormalized) IOSig() (int, int)

func (*LABToNormalized) Iter added in v1.8.2

func (n *LABToNormalized) Iter(f func(ChannelTransformer) bool)

func (LABToNormalized) String added in v1.8.2

func (n LABToNormalized) String() string

func (*LABToNormalized) Transform added in v1.8.2

func (m *LABToNormalized) Transform(x, y, z unit_float) (unit_float, unit_float, unit_float)

func (*LABToNormalized) TransformGeneral added in v1.8.2

func (m *LABToNormalized) TransformGeneral(o, i []unit_float)

type LABtoXYZ added in v1.8.2

type LABtoXYZ struct {
	// contains filtered or unexported fields
}

func NewLABtoXYZ added in v1.8.2

func NewLABtoXYZ(whitepoint XYZType) *LABtoXYZ

func (*LABtoXYZ) IOSig added in v1.8.2

func (n *LABtoXYZ) IOSig() (int, int)

func (*LABtoXYZ) Iter added in v1.8.2

func (n *LABtoXYZ) Iter(f func(ChannelTransformer) bool)

func (*LABtoXYZ) String added in v1.8.2

func (n *LABtoXYZ) String() string

func (*LABtoXYZ) Transform added in v1.8.2

func (c *LABtoXYZ) Transform(l, a, b unit_float) (unit_float, unit_float, unit_float)

func (*LABtoXYZ) TransformGeneral added in v1.8.2

func (m *LABtoXYZ) TransformGeneral(o, i []unit_float)

type LABtosRGB added in v1.8.2

type LABtosRGB struct {
	// contains filtered or unexported fields
}

func NewLABtosRGB added in v1.8.2

func NewLABtosRGB(whitepoint XYZType, clamp, map_gamut bool) *LABtosRGB

func (LABtosRGB) IOSig added in v1.8.2

func (n LABtosRGB) IOSig() (int, int)

func (LABtosRGB) Iter added in v1.8.2

func (n LABtosRGB) Iter(f func(ChannelTransformer) bool)

func (LABtosRGB) String added in v1.8.2

func (n LABtosRGB) String() string

func (LABtosRGB) Transform added in v1.8.2

func (c LABtosRGB) Transform(l, a, b unit_float) (unit_float, unit_float, unit_float)

func (LABtosRGB) TransformGeneral added in v1.8.2

func (m LABtosRGB) TransformGeneral(o, i []unit_float)

type LocalizedString

type LocalizedString struct {
	Language string // e.g. "en"
	Country  string // e.g. "US"
	Value    string
}

type MFT added in v1.8.2

type MFT struct {
	// contains filtered or unexported fields
}

func (*MFT) IOSig added in v1.8.2

func (c *MFT) IOSig() (int, int)

func (*MFT) Iter added in v1.8.2

func (c *MFT) Iter(f func(ChannelTransformer) bool)

func (MFT) String added in v1.8.2

func (c MFT) String() string

func (*MFT) Transform added in v1.8.2

func (mft *MFT) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*MFT) TransformGeneral added in v1.8.2

func (mft *MFT) TransformGeneral(o, i []unit_float)

type Matrix3 added in v1.8.2

type Matrix3 [3][3]unit_float

func NewScalingMatrix3 added in v1.8.2

func NewScalingMatrix3(scale unit_float) *Matrix3

func (*Matrix3) AsMatrix3 added in v1.8.2

func (m *Matrix3) AsMatrix3() *Matrix3

func (*Matrix3) Equals added in v1.8.2

func (m *Matrix3) Equals(o *Matrix3, threshold unit_float) bool

func (*Matrix3) IOSig added in v1.8.2

func (c *Matrix3) IOSig() (int, int)

func (*Matrix3) Inverted added in v1.8.2

func (m *Matrix3) Inverted() (ans Matrix3, err error)

func (*Matrix3) Iter added in v1.8.2

func (c *Matrix3) Iter(f func(ChannelTransformer) bool)

func (*Matrix3) Multiply added in v1.8.2

func (m *Matrix3) Multiply(o Matrix3) Matrix3

Return m * o

func (*Matrix3) Scale added in v1.8.2

func (m *Matrix3) Scale(s unit_float)

func (*Matrix3) String added in v1.8.2

func (m *Matrix3) String() string

func (*Matrix3) Transform added in v1.8.2

func (m *Matrix3) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*Matrix3) TransformGeneral added in v1.8.2

func (m *Matrix3) TransformGeneral(o, i []unit_float)

func (*Matrix3) Transpose added in v1.8.2

func (m *Matrix3) Transpose() Matrix3

type MatrixWithOffset added in v1.8.2

type MatrixWithOffset struct {
	// contains filtered or unexported fields
}

func (*MatrixWithOffset) IOSig added in v1.8.2

func (c *MatrixWithOffset) IOSig() (int, int)

func (*MatrixWithOffset) Iter added in v1.8.2

func (c *MatrixWithOffset) Iter(f func(ChannelTransformer) bool)

func (MatrixWithOffset) String added in v1.8.2

func (m MatrixWithOffset) String() string

func (*MatrixWithOffset) Transform added in v1.8.2

func (m *MatrixWithOffset) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*MatrixWithOffset) TransformGeneral added in v1.8.2

func (m *MatrixWithOffset) TransformGeneral(o, i []unit_float)

func (*MatrixWithOffset) Translation added in v1.8.2

func (m *MatrixWithOffset) Translation() *Translation

type ModularTag added in v1.8.2

type ModularTag struct {
	// contains filtered or unexported fields
}

ModularTag represents a modular tag section 10.12 and 10.13 of ICC.1-2202-05.pdf

func (*ModularTag) IOSig added in v1.8.2

func (m *ModularTag) IOSig() (i int, o int)

func (*ModularTag) IsSuitableFor added in v1.8.2

func (m *ModularTag) IsSuitableFor(num_input_channels, num_output_channels int) bool

func (*ModularTag) Iter added in v1.8.2

func (m *ModularTag) Iter(f func(ChannelTransformer) bool)

func (ModularTag) String added in v1.8.2

func (m ModularTag) String() string

func (*ModularTag) Transform added in v1.8.2

func (m *ModularTag) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*ModularTag) TransformGeneral added in v1.8.2

func (m *ModularTag) TransformGeneral(o, i []unit_float)

type MultiLocalizedTag

type MultiLocalizedTag struct {
	Strings []LocalizedString
}

func (MultiLocalizedTag) BestGuessValue

func (p MultiLocalizedTag) BestGuessValue() string

type NormalizedToLAB added in v1.8.2

type NormalizedToLAB int

A transformer to convert normalized [0,1] to the LAB co-ordinate system used by ICC PCS LAB profiles [0-100], [-128, 127]

func NewNormalizedToLAB added in v1.8.2

func NewNormalizedToLAB() *NormalizedToLAB

func (NormalizedToLAB) IOSig added in v1.8.2

func (n NormalizedToLAB) IOSig() (int, int)

func (*NormalizedToLAB) Iter added in v1.8.2

func (n *NormalizedToLAB) Iter(f func(ChannelTransformer) bool)

func (NormalizedToLAB) String added in v1.8.2

func (n NormalizedToLAB) String() string

func (*NormalizedToLAB) Transform added in v1.8.2

func (m *NormalizedToLAB) Transform(x, y, z unit_float) (unit_float, unit_float, unit_float)

func (*NormalizedToLAB) TransformGeneral added in v1.8.2

func (m *NormalizedToLAB) TransformGeneral(o, i []unit_float)

type ParametricCurveFunction added in v1.8.2

type ParametricCurveFunction uint16
const (
	SimpleGammaFunction     ParametricCurveFunction = 0 // Y = X^g
	ConditionalZeroFunction ParametricCurveFunction = 1 // Y = (aX+b)^g for X >= d, else 0
	ConditionalCFunction    ParametricCurveFunction = 2 // Y = (aX+b)^g for X >= d, else c
	SplitFunction           ParametricCurveFunction = 3 // Two different functions split at d
	ComplexFunction         ParametricCurveFunction = 4 // More complex piecewise function
)

type Pipeline added in v1.8.2

type Pipeline struct {
	// contains filtered or unexported fields
}

func (*Pipeline) Append added in v1.8.2

func (p *Pipeline) Append(c ...ChannelTransformer)

func (*Pipeline) Finalize added in v1.8.2

func (p *Pipeline) Finalize(optimize bool)

func (*Pipeline) IOSig added in v1.8.2

func (p *Pipeline) IOSig() (i int, o int)

func (*Pipeline) Insert added in v1.8.2

func (p *Pipeline) Insert(idx int, c ChannelTransformer)

func (*Pipeline) IsSuitableFor added in v1.8.2

func (p *Pipeline) IsSuitableFor(i, o int) bool

func (*Pipeline) IsXYZSRGB added in v1.8.2

func (p *Pipeline) IsXYZSRGB() bool

func (*Pipeline) Len added in v1.8.2

func (p *Pipeline) Len() int

func (*Pipeline) String added in v1.8.2

func (p *Pipeline) String() string

func (*Pipeline) Transform added in v1.8.2

func (p *Pipeline) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*Pipeline) TransformDebug added in v1.8.2

func (p *Pipeline) TransformDebug(r, g, b unit_float, f Debug_callback) (unit_float, unit_float, unit_float)

func (*Pipeline) TransformGeneral added in v1.8.2

func (p *Pipeline) TransformGeneral(out, in []unit_float)

func (*Pipeline) TransformGeneralDebug added in v1.8.2

func (p *Pipeline) TransformGeneralDebug(out, in []unit_float, f General_debug_callback)

func (*Pipeline) UseTrilinearInsteadOfTetrahedral added in v1.8.2

func (p *Pipeline) UseTrilinearInsteadOfTetrahedral()

func (*Pipeline) Weld added in v1.8.2

func (p *Pipeline) Weld(other *Pipeline, optimize bool) (ans *Pipeline)

type PlainText

type PlainText struct {
	// contains filtered or unexported fields
}

func (PlainText) BestGuessValue

func (p PlainText) BestGuessValue() string

type PointsCurve added in v1.8.2

type PointsCurve struct {
	// contains filtered or unexported fields
}

func (PointsCurve) InverseTransform added in v1.8.2

func (c PointsCurve) InverseTransform(v unit_float) unit_float

func (*PointsCurve) Prepare added in v1.8.2

func (c *PointsCurve) Prepare() error

func (PointsCurve) String added in v1.8.2

func (c PointsCurve) String() string

func (PointsCurve) Transform added in v1.8.2

func (c PointsCurve) Transform(v unit_float) unit_float

type PrimaryPlatform

type PrimaryPlatform uint32
const (
	PrimaryPlatformNone      PrimaryPlatform = 0x00000000
	PrimaryPlatformApple     PrimaryPlatform = 0x4150504C // 'AAPL'
	PrimaryPlatformMicrosoft PrimaryPlatform = 0x4D534654 // 'MSFT'
	PrimaryPlatformSGI       PrimaryPlatform = 0x53474920 // 'SGI '
	PrimaryPlatformSun       PrimaryPlatform = 0x53554E57 // 'SUNW'
)

func (PrimaryPlatform) String

func (pp PrimaryPlatform) String() string

type Profile

type Profile struct {
	Header        Header
	TagTable      TagTable
	PCSIlluminant XYZType
	// contains filtered or unexported fields
}

func DecodeProfile added in v1.8.2

func DecodeProfile(r io.Reader) (ans *Profile, err error)

func ReadProfile added in v1.8.2

func ReadProfile(path string) (ans *Profile, err error)

func (*Profile) BlackPoint added in v1.8.2

func (p *Profile) BlackPoint(intent RenderingIntent, debug General_debug_callback) (ans XYZType)

func (*Profile) CreateDefaultTransformerToDevice added in v1.8.2

func (p *Profile) CreateDefaultTransformerToDevice() (*Pipeline, error)

func (*Profile) CreateDefaultTransformerToPCS added in v1.8.2

func (p *Profile) CreateDefaultTransformerToPCS(input_channels int) (*Pipeline, error)

func (*Profile) CreateTransformerToDevice added in v1.8.2

func (p *Profile) CreateTransformerToDevice(rendering_intent RenderingIntent, use_blackpoint_compensation, optimize bool) (ans *Pipeline, err error)

func (*Profile) CreateTransformerToPCS added in v1.8.2

func (p *Profile) CreateTransformerToPCS(rendering_intent RenderingIntent, input_channels int, optimize bool) (ans *Pipeline, err error)

func (*Profile) CreateTransformerToSRGB added in v1.8.2

func (p *Profile) CreateTransformerToSRGB(rendering_intent RenderingIntent, use_blackpoint_compensation bool, input_channels int, clamp, map_gamut, optimize bool) (ans *Pipeline, err error)

func (*Profile) Description

func (p *Profile) Description() (string, error)

func (*Profile) DeviceManufacturerDescription

func (p *Profile) DeviceManufacturerDescription() (string, error)

func (*Profile) DeviceModelDescription

func (p *Profile) DeviceModelDescription() (string, error)

func (*Profile) IsMatrixShaper added in v1.8.2

func (p *Profile) IsMatrixShaper() bool

func (*Profile) IsSRGB added in v1.8.2

func (p *Profile) IsSRGB() bool

type ProfileReader

type ProfileReader struct {
	// contains filtered or unexported fields
}

func NewProfileReader

func NewProfileReader(r io.Reader) *ProfileReader

func (*ProfileReader) ReadProfile

func (pr *ProfileReader) ReadProfile() (p *Profile, err error)

type RenderingIntent

type RenderingIntent uint32
const (
	PerceptualRenderingIntent           RenderingIntent = 0
	RelativeColorimetricRenderingIntent RenderingIntent = 1
	SaturationRenderingIntent           RenderingIntent = 2
	AbsoluteColorimetricRenderingIntent RenderingIntent = 3
)

func (RenderingIntent) String

func (ri RenderingIntent) String() string

type Scaling added in v1.8.2

type Scaling struct {
	// contains filtered or unexported fields
}

func NewLABFromMFT2 added in v1.8.2

func NewLABFromMFT2() *Scaling

A transformer that converts from the legacy LAB encoding used in the obsolete lut16type (mft2) tags

func NewLABToMFT2 added in v1.8.2

func NewLABToMFT2() *Scaling

func NewNormalizedToXYZ added in v1.8.2

func NewNormalizedToXYZ() *Scaling

A transformer to convert normalized [0,1] values to the [0,1.99997] (u1Fixed15Number) values used by ICC XYZ PCS space

func NewScaling added in v1.8.2

func NewScaling(name string, s unit_float) *Scaling

func NewXYZToNormalized added in v1.8.2

func NewXYZToNormalized() *Scaling

func (*Scaling) AsMatrix3 added in v1.8.2

func (m *Scaling) AsMatrix3() *Matrix3

func (*Scaling) IOSig added in v1.8.2

func (n *Scaling) IOSig() (int, int)

func (*Scaling) Iter added in v1.8.2

func (n *Scaling) Iter(f func(ChannelTransformer) bool)

func (*Scaling) String added in v1.8.2

func (n *Scaling) String() string

func (*Scaling) Transform added in v1.8.2

func (m *Scaling) Transform(x, y, z unit_float) (unit_float, unit_float, unit_float)

func (*Scaling) TransformGeneral added in v1.8.2

func (m *Scaling) TransformGeneral(o, i []unit_float)

type Scaling4 added in v1.8.2

type Scaling4 struct {
	// contains filtered or unexported fields
}

func (*Scaling4) IOSig added in v1.8.2

func (n *Scaling4) IOSig() (int, int)

func (*Scaling4) Iter added in v1.8.2

func (n *Scaling4) Iter(f func(ChannelTransformer) bool)

func (*Scaling4) String added in v1.8.2

func (n *Scaling4) String() string

func (*Scaling4) Transform added in v1.8.2

func (m *Scaling4) Transform(x, y, z unit_float) (unit_float, unit_float, unit_float)

func (*Scaling4) TransformGeneral added in v1.8.2

func (m *Scaling4) TransformGeneral(o, i []unit_float)

type Signature

type Signature uint32
const (
	UnknownSignature     Signature = 0
	ProfileFileSignature Signature = 0x61637370 // 'acsp'
	TextTagSignature     Signature = 0x74657874 // 'text'
	SignateTagSignature  Signature = 0x73696720 // 'sig '

	DescSignature                          Signature = 0x64657363 // 'desc'
	MultiLocalisedUnicodeSignature         Signature = 0x6D6C7563 // 'mluc'
	DeviceManufacturerDescriptionSignature Signature = 0x646d6e64 // 'dmnd'
	DeviceModelDescriptionSignature        Signature = 0x646d6464 // 'dmdd'

	AdobeManufacturerSignature      Signature = 0x41444245 // 'ADBE'
	AppleManufacturerSignature      Signature = 0x6170706c // 'appl'
	AppleUpperManufacturerSignature Signature = 0x4150504c // 'APPL'
	IECManufacturerSignature        Signature = 0x49454320 // 'IEC '

	AdobeRGBModelSignature  Signature = 0x52474220 // 'RGB '
	SRGBModelSignature      Signature = 0x73524742 // 'sRGB'
	PhotoProModelSignature  Signature = 0x50525452 // 'PTPR'
	DisplayP3ModelSignature Signature = 0x70332020 // 'p3  '

	ChromaticityTypeSignature          Signature = 0x6368726D /* 'chrm' */
	ColorantOrderTypeSignature         Signature = 0x636C726F /* 'clro' */
	ColorantTableTypeSignature         Signature = 0x636C7274 /* 'clrt' */
	CrdInfoTypeSignature               Signature = 0x63726469 /* 'crdi' Removed in V4 */
	CurveTypeSignature                 Signature = 0x63757276 /* 'curv' */
	DataTypeSignature                  Signature = 0x64617461 /* 'data' */
	DictTypeSignature                  Signature = 0x64696374 /* 'dict' */
	DateTimeTypeSignature              Signature = 0x6474696D /* 'dtim' */
	DeviceSettingsTypeSignature        Signature = 0x64657673 /* 'devs' Removed in V4 */
	Lut16TypeSignature                 Signature = 0x6d667432 /* 'mft2' */
	Lut8TypeSignature                  Signature = 0x6d667431 /* 'mft1' */
	LutAtoBTypeSignature               Signature = 0x6d414220 /* 'mAB ' */
	LutBtoATypeSignature               Signature = 0x6d424120 /* 'mBA ' */
	MeasurementTypeSignature           Signature = 0x6D656173 /* 'meas' */
	MultiLocalizedUnicodeTypeSignature Signature = 0x6D6C7563 /* 'mluc' */
	MultiProcessElementTypeSignature   Signature = 0x6D706574 /* 'mpet' */
	NamedColorTypeSignature            Signature = 0x6E636f6C /* 'ncol' OBSOLETE use ncl2 */
	NamedColor2TypeSignature           Signature = 0x6E636C32 /* 'ncl2' */
	ParametricCurveTypeSignature       Signature = 0x70617261 /* 'para' */
	ProfileSequenceDescTypeSignature   Signature = 0x70736571 /* 'pseq' */
	ProfileSequceIdTypeSignature       Signature = 0x70736964 /* 'psid' */
	ResponseCurveSet16TypeSignature    Signature = 0x72637332 /* 'rcs2' */
	S15Fixed16ArrayTypeSignature       Signature = 0x73663332 /* 'sf32' */
	ScreeningTypeSignature             Signature = 0x7363726E /* 'scrn' Removed in V4 */
	SignatureTypeSignature             Signature = 0x73696720 /* 'sig ' */
	TextTypeSignature                  Signature = 0x74657874 /* 'text' */
	TextDescriptionTypeSignature       Signature = 0x64657363 /* 'desc' Removed in V4 */
	U16Fixed16ArrayTypeSignature       Signature = 0x75663332 /* 'uf32' */
	UcrBgTypeSignature                 Signature = 0x62666420 /* 'bfd ' Removed in V4 */
	UInt16ArrayTypeSignature           Signature = 0x75693136 /* 'ui16' */
	UInt32ArrayTypeSignature           Signature = 0x75693332 /* 'ui32' */
	UInt64ArrayTypeSignature           Signature = 0x75693634 /* 'ui64' */
	UInt8ArrayTypeSignature            Signature = 0x75693038 /* 'ui08' */
	ViewingConditionsTypeSignature     Signature = 0x76696577 /* 'view' */
	XYZTypeSignature                   Signature = 0x58595A20 /* 'XYZ ' */
	XYZArrayTypeSignature              Signature = 0x58595A20 /* 'XYZ ' */

	XYZSignature  Signature = 0x58595A20 /* 'XYZ ' */
	LabSignature  Signature = 0x4C616220 /* 'Lab ' */
	LUVSignature  Signature = 0x4C757620 /* 'Luv ' */
	YCbrSignature Signature = 0x59436272 /* 'YCbr' */
	YxySignature  Signature = 0x59787920 /* 'Yxy ' */
	RGBSignature  Signature = 0x52474220 /* 'RGB ' */
	GraySignature Signature = 0x47524159 /* 'GRAY' */
	HSVSignature  Signature = 0x48535620 /* 'HSV ' */
	HLSSignature  Signature = 0x484C5320 /* 'HLS ' */
	CMYKSignature Signature = 0x434D594B /* 'CMYK' */
	CMYSignature  Signature = 0x434D5920 /* 'CMY ' */

	MCH2Signature  Signature = 0x32434C52 /* '2CLR' */
	MCH3Signature  Signature = 0x33434C52 /* '3CLR' */
	MCH4Signature  Signature = 0x34434C52 /* '4CLR' */
	MCH5Signature  Signature = 0x35434C52 /* '5CLR' */
	MCH6Signature  Signature = 0x36434C52 /* '6CLR' */
	MCH7Signature  Signature = 0x37434C52 /* '7CLR' */
	MCH8Signature  Signature = 0x38434C52 /* '8CLR' */
	MCH9Signature  Signature = 0x39434C52 /* '9CLR' */
	MCHASignature  Signature = 0x41434C52 /* 'ACLR' */
	MCHBSignature  Signature = 0x42434C52 /* 'BCLR' */
	MCHCSignature  Signature = 0x43434C52 /* 'CCLR' */
	MCHDSignature  Signature = 0x44434C52 /* 'DCLR' */
	MCHESignature  Signature = 0x45434C52 /* 'ECLR' */
	MCHFSignature  Signature = 0x46434C52 /* 'FCLR' */
	NamedSignature Signature = 0x6e6d636c /* 'nmcl' */

	Color2Signature  Signature = 0x32434C52 /* '2CLR' */
	Color3Signature  Signature = 0x33434C52 /* '3CLR' */
	Color4Signature  Signature = 0x34434C52 /* '4CLR' */
	Color5Signature  Signature = 0x35434C52 /* '5CLR' */
	Color6Signature  Signature = 0x36434C52 /* '6CLR' */
	Color7Signature  Signature = 0x37434C52 /* '7CLR' */
	Color8Signature  Signature = 0x38434C52 /* '8CLR' */
	Color9Signature  Signature = 0x39434C52 /* '9CLR' */
	Color10Signature Signature = 0x41434C52 /* 'ACLR' */
	Color11Signature Signature = 0x42434C52 /* 'BCLR' */
	Color12Signature Signature = 0x43434C52 /* 'CCLR' */
	Color13Signature Signature = 0x44434C52 /* 'DCLR' */
	Color14Signature Signature = 0x45434C52 /* 'ECLR' */
	Color15Signature Signature = 0x46434C52 /* 'FCLR' */

	AToB0TagSignature                          Signature = 0x41324230 /* 'A2B0' */
	AToB1TagSignature                          Signature = 0x41324231 /* 'A2B1' */
	AToB2TagSignature                          Signature = 0x41324232 /* 'A2B2' */
	AToB3TagSignature                          Signature = 0x41324233 /* 'A2B3' */
	BlueColorantTagSignature                   Signature = 0x6258595A /* 'bXYZ' */
	BlueMatrixColumnTagSignature               Signature = 0x6258595A /* 'bXYZ' */
	BlueTRCTagSignature                        Signature = 0x62545243 /* 'bTRC' */
	BToA0TagSignature                          Signature = 0x42324130 /* 'B2A0' */
	BToA1TagSignature                          Signature = 0x42324131 /* 'B2A1' */
	BToA2TagSignature                          Signature = 0x42324132 /* 'B2A2' */
	BToA3TagSignature                          Signature = 0x42324133 /* 'B2A3' */
	CalibrationDateTimeTagSignature            Signature = 0x63616C74 /* 'calt' */
	CharTargetTagSignature                     Signature = 0x74617267 /* 'targ' */
	ChromaticAdaptationTagSignature            Signature = 0x63686164 /* 'chad' */
	ChromaticityTagSignature                   Signature = 0x6368726D /* 'chrm' */
	ColorantOrderTagSignature                  Signature = 0x636C726F /* 'clro' */
	ColorantTableTagSignature                  Signature = 0x636C7274 /* 'clrt' */
	ColorantTableOutTagSignature               Signature = 0x636C6F74 /* 'clot' */
	ColorimetricIntentImageStateTagSignature   Signature = 0x63696973 /* 'ciis' */
	CopyrightTagSignature                      Signature = 0x63707274 /* 'cprt' */
	CrdInfoTagSignature                        Signature = 0x63726469 /* 'crdi' Removed in V4 */
	DataTagSignature                           Signature = 0x64617461 /* 'data' Removed in V4 */
	DateTimeTagSignature                       Signature = 0x6474696D /* 'dtim' Removed in V4 */
	DeviceMfgDescTagSignature                  Signature = 0x646D6E64 /* 'dmnd' */
	DeviceModelDescTagSignature                Signature = 0x646D6464 /* 'dmdd' */
	DeviceSettingsTagSignature                 Signature = 0x64657673 /* 'devs' Removed in V4 */
	DToB0TagSignature                          Signature = 0x44324230 /* 'D2B0' */
	DToB1TagSignature                          Signature = 0x44324231 /* 'D2B1' */
	DToB2TagSignature                          Signature = 0x44324232 /* 'D2B2' */
	DToB3TagSignature                          Signature = 0x44324233 /* 'D2B3' */
	BToD0TagSignature                          Signature = 0x42324430 /* 'B2D0' */
	BToD1TagSignature                          Signature = 0x42324431 /* 'B2D1' */
	BToD2TagSignature                          Signature = 0x42324432 /* 'B2D2' */
	BToD3TagSignature                          Signature = 0x42324433 /* 'B2D3' */
	GamutTagSignature                          Signature = 0x67616D74 /* 'gamt' */
	GrayTRCTagSignature                        Signature = 0x6b545243 /* 'kTRC' */
	GreenColorantTagSignature                  Signature = 0x6758595A /* 'gXYZ' */
	GreenMatrixColumnTagSignature              Signature = 0x6758595A /* 'gXYZ' */
	GreenTRCTagSignature                       Signature = 0x67545243 /* 'gTRC' */
	LuminanceTagSignature                      Signature = 0x6C756d69 /* 'lumi' */
	MeasurementTagSignature                    Signature = 0x6D656173 /* 'meas' */
	MediaBlackPointTagSignature                Signature = 0x626B7074 /* 'bkpt' */
	MediaWhitePointTagSignature                Signature = 0x77747074 /* 'wtpt' */
	MetaDataTagSignature                       Signature = 0x6D657461 /* 'meta' */
	NamedColorTagSignature                     Signature = 0x6E636f6C /* 'ncol' OBSOLETE use ncl2 */
	NamedColor2TagSignature                    Signature = 0x6E636C32 /* 'ncl2' */
	OutputResponseTagSignature                 Signature = 0x72657370 /* 'resp' */
	PerceptualRenderingIntentGamutTagSignature Signature = 0x72696730 /* 'rig0' */
	Preview0TagSignature                       Signature = 0x70726530 /* 'pre0' */
	Preview1TagSignature                       Signature = 0x70726531 /* 'pre1' */
	Preview2TagSignature                       Signature = 0x70726532 /* 'pre2' */
	PrintConditionTagSignature                 Signature = 0x7074636e /* 'ptcn' */
	ProfileDescriptionTagSignature             Signature = 0x64657363 /* 'desc' */
	ProfileSequenceDescTagSignature            Signature = 0x70736571 /* 'pseq' */
	ProfileSequceIdTagSignature                Signature = 0x70736964 /* 'psid' */
	Ps2CRD0TagSignature                        Signature = 0x70736430 /* 'psd0' Removed in V4 */
	Ps2CRD1TagSignature                        Signature = 0x70736431 /* 'psd1' Removed in V4 */
	Ps2CRD2TagSignature                        Signature = 0x70736432 /* 'psd2' Removed in V4 */
	Ps2CRD3TagSignature                        Signature = 0x70736433 /* 'psd3' Removed in V4 */
	Ps2CSATagSignature                         Signature = 0x70733273 /* 'ps2s' Removed in V4 */
	Ps2RenderingIntentTagSignature             Signature = 0x70733269 /* 'ps2i' Removed in V4 */
	RedColorantTagSignature                    Signature = 0x7258595A /* 'rXYZ' */
	RedMatrixColumnTagSignature                Signature = 0x7258595A /* 'rXYZ' */
	RedTRCTagSignature                         Signature = 0x72545243 /* 'rTRC' */
	SaturationRenderingIntentGamutTagSignature Signature = 0x72696732 /* 'rig2' */
	ScreeningDescTagSignature                  Signature = 0x73637264 /* 'scrd' Removed in V4 */
	ScreeningTagSignature                      Signature = 0x7363726E /* 'scrn' Removed in V4 */
	TechnologyTagSignature                     Signature = 0x74656368 /* 'tech' */
	UcrBgTagSignature                          Signature = 0x62666420 /* 'bfd ' Removed in V4 */
	ViewingCondDescTagSignature                Signature = 0x76756564 /* 'vued' */
	ViewingConditionsTagSignature              Signature = 0x76696577 /* 'view' */

	CurveSetElemTypeSignature Signature = 0x63767374 /* 'cvst' */
	MatrixElemTypeSignature   Signature = 0x6D617466 /* 'matf' */
	CLutElemTypeSignature     Signature = 0x636C7574 /* 'clut' */
	BAcsElemTypeSignature     Signature = 0x62414353 /* 'bACS' */
	EAcsElemTypeSignature     Signature = 0x65414353 /* 'eACS' */
)

func SignatureFromString

func SignatureFromString(sig string) Signature

func (Signature) String

func (s Signature) String() string

type SplitCurve added in v1.8.2

type SplitCurve struct {
	// contains filtered or unexported fields
}

func (*SplitCurve) InverseTransform added in v1.8.2

func (c *SplitCurve) InverseTransform(y unit_float) unit_float

func (*SplitCurve) IsSRGB added in v1.8.2

func (c *SplitCurve) IsSRGB() bool

func (*SplitCurve) Prepare added in v1.8.2

func (c *SplitCurve) Prepare() error

func (*SplitCurve) String added in v1.8.2

func (c *SplitCurve) String() string

func (*SplitCurve) Transform added in v1.8.2

func (c *SplitCurve) Transform(x unit_float) unit_float

type TagTable

type TagTable struct {
	// contains filtered or unexported fields
}

func (*TagTable) Has added in v1.8.2

func (t *TagTable) Has(sig Signature) bool

type TetrahedralInterpolate added in v1.8.2

type TetrahedralInterpolate struct {
	// contains filtered or unexported fields
}

func (*TetrahedralInterpolate) IOSig added in v1.8.2

func (c *TetrahedralInterpolate) IOSig() (int, int)

func (*TetrahedralInterpolate) Iter added in v1.8.2

func (*TetrahedralInterpolate) Samples added in v1.8.2

func (c *TetrahedralInterpolate) Samples() []unit_float

func (TetrahedralInterpolate) String added in v1.8.2

func (c TetrahedralInterpolate) String() string

func (*TetrahedralInterpolate) Tetrahedral_interpolate added in v1.8.2

func (c *TetrahedralInterpolate) Tetrahedral_interpolate(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*TetrahedralInterpolate) Transform added in v1.8.2

func (c *TetrahedralInterpolate) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*TetrahedralInterpolate) TransformGeneral added in v1.8.2

func (m *TetrahedralInterpolate) TransformGeneral(o, i []unit_float)

type TextTag

type TextTag interface {
	BestGuessValue() string
}

type Translation added in v1.8.2

type Translation [3]unit_float

func (*Translation) Empty added in v1.8.2

func (c *Translation) Empty() bool

func (*Translation) IOSig added in v1.8.2

func (c *Translation) IOSig() (int, int)

func (*Translation) Iter added in v1.8.2

func (c *Translation) Iter(f func(ChannelTransformer) bool)

func (Translation) String added in v1.8.2

func (c Translation) String() string

func (*Translation) Transform added in v1.8.2

func (m *Translation) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*Translation) TransformGeneral added in v1.8.2

func (m *Translation) TransformGeneral(o, i []unit_float)

type TrilinearInterpolate added in v1.8.2

type TrilinearInterpolate struct {
	// contains filtered or unexported fields
}

TrilinearInterpolate represents a color lookup table tag (TagColorLookupTable)

func (*TrilinearInterpolate) IOSig added in v1.8.2

func (c *TrilinearInterpolate) IOSig() (int, int)

func (*TrilinearInterpolate) Iter added in v1.8.2

func (c *TrilinearInterpolate) Iter(f func(ChannelTransformer) bool)

func (*TrilinearInterpolate) Samples added in v1.8.2

func (c *TrilinearInterpolate) Samples() []unit_float

func (TrilinearInterpolate) String added in v1.8.2

func (c TrilinearInterpolate) String() string

func (*TrilinearInterpolate) Transform added in v1.8.2

func (c *TrilinearInterpolate) Transform(r, g, b unit_float) (unit_float, unit_float, unit_float)

func (*TrilinearInterpolate) TransformGeneral added in v1.8.2

func (m *TrilinearInterpolate) TransformGeneral(o, i []unit_float)

type UniformFunctionTransformer added in v1.8.2

type UniformFunctionTransformer struct {
	// contains filtered or unexported fields
}

func NewUniformFunctionTransformer added in v1.8.2

func NewUniformFunctionTransformer(name string, f func(unit_float) unit_float) *UniformFunctionTransformer

func (UniformFunctionTransformer) IOSig added in v1.8.2

func (n UniformFunctionTransformer) IOSig() (int, int)

func (*UniformFunctionTransformer) Iter added in v1.8.2

func (UniformFunctionTransformer) String added in v1.8.2

func (*UniformFunctionTransformer) Transform added in v1.8.2

func (c *UniformFunctionTransformer) Transform(x, y, z unit_float) (unit_float, unit_float, unit_float)

func (*UniformFunctionTransformer) TransformGeneral added in v1.8.2

func (c *UniformFunctionTransformer) TransformGeneral(o, i []unit_float)

type Version

type Version struct {
	Major                byte
	MinorAndRev          byte
	Reserved1, Reserved2 byte
}

func (Version) String

func (pv Version) String() string

type WellKnownProfile

type WellKnownProfile int
const (
	UnknownProfile WellKnownProfile = iota
	SRGBProfile
	AdobeRGBProfile
	PhotoProProfile
	DisplayP3Profile
)

type XYZType added in v1.8.2

type XYZType struct{ X, Y, Z unit_float }

func (*XYZType) Lab_to_XYZ added in v1.8.2

func (wt *XYZType) Lab_to_XYZ(l, a, b unit_float) (x, y, z unit_float)

func (*XYZType) XYZ_to_Lab added in v1.8.2

func (wt *XYZType) XYZ_to_Lab(x, y, z unit_float) (l, a, b unit_float)

type XYZtoLAB added in v1.8.2

type XYZtoLAB struct {
	// contains filtered or unexported fields
}

func NewXYZtoLAB added in v1.8.2

func NewXYZtoLAB(whitepoint XYZType) *XYZtoLAB

func (*XYZtoLAB) IOSig added in v1.8.2

func (n *XYZtoLAB) IOSig() (int, int)

func (*XYZtoLAB) Iter added in v1.8.2

func (n *XYZtoLAB) Iter(f func(ChannelTransformer) bool)

func (*XYZtoLAB) String added in v1.8.2

func (n *XYZtoLAB) String() string

func (*XYZtoLAB) Transform added in v1.8.2

func (c *XYZtoLAB) Transform(l, a, b unit_float) (unit_float, unit_float, unit_float)

func (*XYZtoLAB) TransformGeneral added in v1.8.2

func (m *XYZtoLAB) TransformGeneral(o, i []unit_float)

type XYZtosRGB added in v1.8.2

type XYZtosRGB struct {
	// contains filtered or unexported fields
}

func NewXYZtosRGB added in v1.8.2

func NewXYZtosRGB(whitepoint XYZType, clamp, map_gamut bool) *XYZtosRGB

func (*XYZtosRGB) AddPreviousMatrix added in v1.8.2

func (n *XYZtosRGB) AddPreviousMatrix(m Matrix3)

func (*XYZtosRGB) IOSig added in v1.8.2

func (n *XYZtosRGB) IOSig() (int, int)

func (*XYZtosRGB) Iter added in v1.8.2

func (n *XYZtosRGB) Iter(f func(ChannelTransformer) bool)

func (*XYZtosRGB) String added in v1.8.2

func (n *XYZtosRGB) String() string

func (*XYZtosRGB) Transform added in v1.8.2

func (c *XYZtosRGB) Transform(l, a, b unit_float) (unit_float, unit_float, unit_float)

func (*XYZtosRGB) TransformGeneral added in v1.8.2

func (m *XYZtosRGB) TransformGeneral(o, i []unit_float)

Jump to

Keyboard shortcuts

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