Documentation
¶
Index ¶
- type CxFObject
- type Factory
- type ICCProfile
- func (p *ICCProfile) Class() string
- func (p *ICCProfile) ColorSpace() string
- func (p *ICCProfile) Data() []byte
- func (p *ICCProfile) GetTag(sig string) ([]byte, bool)
- func (p *ICCProfile) Name() string
- func (p *ICCProfile) ReadCurveTag(sig string) (float64, error)
- func (p *ICCProfile) ReadXYZTag(sig string) ([3]float64, error)
- type Profile
- type RenderingIntent
- type SpectrallyDefinedColor
- type Transform
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CxFObject ¶
type CxFObject struct {
Data []byte // XML data
}
CxFObject represents a Color Exchange Format object (PDF 2.0).
type Factory ¶
type Factory interface {
NewProfile(data []byte) (Profile, error)
NewTransform(src, dst Profile, intent RenderingIntent) (Transform, error)
}
Factory creates profiles and transforms.
type ICCProfile ¶
type ICCProfile struct {
// contains filtered or unexported fields
}
ICCProfile implements Profile for ICC data.
func NewICCProfile ¶
func NewICCProfile(data []byte) (*ICCProfile, error)
NewICCProfile creates a new ICCProfile from bytes.
func (*ICCProfile) Class ¶
func (p *ICCProfile) Class() string
func (*ICCProfile) ColorSpace ¶
func (p *ICCProfile) ColorSpace() string
func (*ICCProfile) Data ¶
func (p *ICCProfile) Data() []byte
func (*ICCProfile) GetTag ¶
func (p *ICCProfile) GetTag(sig string) ([]byte, bool)
GetTag returns the raw data for a tag if it exists.
func (*ICCProfile) Name ¶
func (p *ICCProfile) Name() string
func (*ICCProfile) ReadCurveTag ¶
func (p *ICCProfile) ReadCurveTag(sig string) (float64, error)
ReadCurveTag reads a curveType or parametricCurveType tag. Returns a gamma value (if simple gamma) or error if complex/LUT.
func (*ICCProfile) ReadXYZTag ¶
func (p *ICCProfile) ReadXYZTag(sig string) ([3]float64, error)
ReadXYZTag reads an XYZType tag (array of 3 XYZ numbers).
type Profile ¶
type Profile interface {
// Name returns the profile description or name.
Name() string
// ColorSpace returns the color space signature (e.g., "RGB ", "CMYK").
ColorSpace() string
// Class returns the profile class (e.g., "mntr", "prtr").
Class() string
// Data returns the raw profile bytes.
Data() []byte
}
Profile represents a color profile (e.g., ICC).
type RenderingIntent ¶
type RenderingIntent int
RenderingIntent specifies the rendering intent for color conversion.
const ( IntentPerceptual RenderingIntent = iota IntentRelativeColorimetric IntentSaturation IntentAbsoluteColorimetric )
type SpectrallyDefinedColor ¶
SpectrallyDefinedColor represents a color defined by spectral data.
Click to show internal directories.
Click to hide internal directories.