Documentation
¶
Overview ¶
Package crs implements Adobe Camera Raw metadata as defined in chapter 3.3 of XMP Specification Part 2.
Index ¶
- Constants
- Variables
- func NewModel(name string) xmp.Model
- type CameraRawInfo
- func (x CameraRawInfo) Can(nsName string) bool
- func (x *CameraRawInfo) CanTag(tag string) bool
- func (x *CameraRawInfo) GetTag(tag string) (string, error)
- func (x CameraRawInfo) Namespaces() xmp.NamespaceList
- func (x *CameraRawInfo) SetTag(tag, value string) error
- func (x *CameraRawInfo) SyncFromXMP(d *xmp.Document) error
- func (x *CameraRawInfo) SyncModel(d *xmp.Document) error
- func (x CameraRawInfo) SyncToXMP(d *xmp.Document) error
- type Correction
- type CorrectionList
- type CorrectionMask
- type CorrectionMaskList
- type CropUnits
- type Point
- type PointList
- type RetouchArea
- type RetouchAreaList
- type RetouchInfo
- type ToneCurve
- type WhiteBalance
Constants ¶
View Source
const ( CropUnitsPixels = iota // 0 CropUnitsInches // 1 CropUnitsCm // 2 )
Variables ¶
View Source
var (
NsCrs = xmp.NewNamespace("crs", "http://ns.adobe.com/camera-raw-settings/1.0/", NewModel)
)
Functions ¶
Types ¶
type CameraRawInfo ¶
type CameraRawInfo struct {
AutoBrightness xmp.Bool `xmp:"crs:AutoBrightness"`
AutoContrast xmp.Bool `xmp:"crs:AutoContrast"`
AutoExposure xmp.Bool `xmp:"crs:AutoExposure"`
AutoShadows xmp.Bool `xmp:"crs:AutoShadows"`
BlueHue int64 `xmp:"crs:BlueHue"`
BlueSaturation int64 `xmp:"crs:BlueSaturation"`
Brightness int64 `xmp:"crs:Brightness"`
CameraProfile string `xmp:"crs:CameraProfile"`
ChromaticAberrationB int64 `xmp:"crs:ChromaticAberrationB"`
ChromaticAberrationR int64 `xmp:"crs:ChromaticAberrationR"`
ColorNoiseReduction int64 `xmp:"crs:ColorNoiseReduction"`
Contrast int64 `xmp:"crs:Contrast"`
CropTop float32 `xmp:"crs:CropTop"`
CropLeft float32 `xmp:"crs:CropLeft"`
CropBottom float32 `xmp:"crs:CropBottom"`
CropRight float32 `xmp:"crs:CropRight"`
CropAngle float32 `xmp:"crs:CropAngle"`
CropWidth float32 `xmp:"crs:CropWidth"`
CropHeight float32 `xmp:"crs:CropHeight"`
CropUnits CropUnits `xmp:"crs:CropUnits"`
Exposure float32 `xmp:"crs:Exposure"`
GreenHue int64 `xmp:"crs:GreenHue"`
GreenSaturation int64 `xmp:"crs:GreenSaturation"`
HasCrop xmp.Bool `xmp:"crs:HasCrop"`
HasSettings xmp.Bool `xmp:"crs:HasSettings"`
LuminanceSmoothing int64 `xmp:"crs:LuminanceSmoothing"`
RawFileName string `xmp:"crs:RawFileName"`
RedHue int64 `xmp:"crs:RedHue"`
RedSaturation int64 `xmp:"crs:RedSaturation"`
Saturation int64 `xmp:"crs:Saturation"`
Shadows int64 `xmp:"crs:Shadows"`
ShadowTint int64 `xmp:"crs:ShadowTint"`
Sharpness int64 `xmp:"crs:Sharpness"`
Temperature int64 `xmp:"crs:Temperature"`
Tint int64 `xmp:"crs:Tint"`
ToneCurve xmp.StringArray `xmp:"crs:ToneCurve"`
ToneCurveName ToneCurve `xmp:"crs:ToneCurveName"`
Version string `xmp:"crs:Version"`
VignetteAmount int64 `xmp:"crs:VignetteAmount"`
VignetteMidpoint int64 `xmp:"crs:VignetteMidpoint"`
WhiteBalance WhiteBalance `xmp:"crs:WhiteBalance"`
// non-standard fields found in samples in the wild
AlreadyApplied xmp.Bool `xmp:"crs:AlreadyApplied"`
Dehaze int `xmp:"crs:Dehaze"`
Converter string `xmp:"crs:Converter"`
MoireFilter string `xmp:"crs:MoireFilter"`
Smoothness int64 `xmp:"crs:Smoothness"`
CameraProfileDigest string `xmp:"crs:CameraProfileDigest"`
Clarity int64 `xmp:"crs:Clarity"`
ConvertToGrayscale xmp.Bool `xmp:"crs:ConvertToGrayscale"`
Defringe int64 `xmp:"crs:Defringe"`
FillLight int64 `xmp:"crs:FillLight"`
HighlightRecovery int64 `xmp:"crs:HighlightRecovery"`
HueAdjustmentAqua int64 `xmp:"crs:HueAdjustmentAqua"`
HueAdjustmentBlue int64 `xmp:"crs:HueAdjustmentBlue"`
HueAdjustmentGreen int64 `xmp:"crs:HueAdjustmentGreen"`
HueAdjustmentMagenta int64 `xmp:"crs:HueAdjustmentMagenta"`
HueAdjustmentOrange int64 `xmp:"crs:HueAdjustmentOrange"`
HueAdjustmentPurple int64 `xmp:"crs:HueAdjustmentPurple"`
HueAdjustmentRed int64 `xmp:"crs:HueAdjustmentRed"`
HueAdjustmentYellow int64 `xmp:"crs:HueAdjustmentYellow"`
IncrementalTemperature int64 `xmp:"crs:IncrementalTemperature"`
IncrementalTint int64 `xmp:"crs:IncrementalTint"`
LuminanceAdjustmentAqua int64 `xmp:"crs:LuminanceAdjustmentAqua"`
LuminanceAdjustmentBlue int64 `xmp:"crs:LuminanceAdjustmentBlue"`
LuminanceAdjustmentGreen int64 `xmp:"crs:LuminanceAdjustmentGreen"`
LuminanceAdjustmentMagenta int64 `xmp:"crs:LuminanceAdjustmentMagenta"`
LuminanceAdjustmentOrange int64 `xmp:"crs:LuminanceAdjustmentOrange"`
LuminanceAdjustmentPurple int64 `xmp:"crs:LuminanceAdjustmentPurple"`
LuminanceAdjustmentRed int64 `xmp:"crs:LuminanceAdjustmentRed"`
LuminanceAdjustmentYellow int64 `xmp:"crs:LuminanceAdjustmentYellow"`
ParametricDarks int64 `xmp:"crs:ParametricDarks"`
ParametricHighlights int64 `xmp:"crs:ParametricHighlights"`
ParametricHighlightSplit int64 `xmp:"crs:ParametricHighlightSplit"`
ParametricLights int64 `xmp:"crs:ParametricLights"`
ParametricMidtoneSplit int64 `xmp:"crs:ParametricMidtoneSplit"`
ParametricShadows int64 `xmp:"crs:ParametricShadows"`
ParametricShadowSplit int64 `xmp:"crs:ParametricShadowSplit"`
SaturationAdjustmentAqua int64 `xmp:"crs:SaturationAdjustmentAqua"`
SaturationAdjustmentBlue int64 `xmp:"crs:SaturationAdjustmentBlue"`
SaturationAdjustmentGreen int64 `xmp:"crs:SaturationAdjustmentGreen"`
SaturationAdjustmentMagenta int64 `xmp:"crs:SaturationAdjustmentMagenta"`
SaturationAdjustmentOrange int64 `xmp:"crs:SaturationAdjustmentOrange"`
SaturationAdjustmentPurple int64 `xmp:"crs:SaturationAdjustmentPurple"`
SaturationAdjustmentRed int64 `xmp:"crs:SaturationAdjustmentRed"`
SaturationAdjustmentYellow int64 `xmp:"crs:SaturationAdjustmentYellow"`
SharpenDetail int64 `xmp:"crs:SharpenDetail"`
SharpenEdgeMasking int64 `xmp:"crs:SharpenEdgeMasking"`
SharpenRadius float32 `xmp:"crs:SharpenRadius"`
SplitToningBalance int64 `xmp:"crs:SplitToningBalance"`
SplitToningHighlightHue int64 `xmp:"crs:SplitToningHighlightHue"`
SplitToningHighlightSaturation int64 `xmp:"crs:SplitToningHighlightSaturation"`
SplitToningShadowHue int64 `xmp:"crs:SplitToningShadowHue"`
SplitToningShadowSaturation int64 `xmp:"crs:SplitToningShadowSaturation"`
Vibrance int64 `xmp:"crs:Vibrance"`
GrayMixerRed int64 `xmp:"crs:GrayMixerRed"`
GrayMixerOrange int64 `xmp:"crs:GrayMixerOrange"`
GrayMixerYellow int64 `xmp:"crs:GrayMixerYellow"`
GrayMixerGreen int64 `xmp:"crs:GrayMixerGreen"`
GrayMixerAqua int64 `xmp:"crs:GrayMixerAqua"`
GrayMixerBlue int64 `xmp:"crs:GrayMixerBlue"`
GrayMixerPurple int64 `xmp:"crs:GrayMixerPurple"`
GrayMixerMagenta int64 `xmp:"crs:GrayMixerMagenta"`
RetouchInfo xmp.StringArray `xmp:"crs:RetouchInfo"`
RedEyeInfo xmp.StringArray `xmp:"crs:RedEyeInfo"`
CropUnit int64 `xmp:"crs:CropUnit"`
PostCropVignetteAmount int64 `xmp:"crs:PostCropVignetteAmount"`
PostCropVignetteMidpoint int64 `xmp:"crs:PostCropVignetteMidpoint"`
PostCropVignetteFeather int64 `xmp:"crs:PostCropVignetteFeather"`
PostCropVignetteRoundness int64 `xmp:"crs:PostCropVignetteRoundness"`
PostCropVignetteStyle int64 `xmp:"crs:PostCropVignetteStyle"`
ProcessVersion string `xmp:"crs:ProcessVersion"`
LensProfileEnable int64 `xmp:"crs:LensProfileEnable"`
LensProfileSetup string `xmp:"crs:LensProfileSetup"`
LensProfileName string `xmp:"crs:LensProfileName"`
LensProfileFilename string `xmp:"crs:LensProfileFilename"`
LensProfileDigest string `xmp:"crs:LensProfileDigest"`
LensProfileDistortionScale int64 `xmp:"crs:LensProfileDistortionScale"`
LensProfileChromaticAberrationScale int64 `xmp:"crs:LensProfileChromaticAberrationScale"`
LensProfileVignettingScale int64 `xmp:"crs:LensProfileVignettingScale"`
LensManualDistortionAmount int64 `xmp:"crs:LensManualDistortionAmount"`
PerspectiveVertical int64 `xmp:"crs:PerspectiveVertical"`
PerspectiveHorizontal int64 `xmp:"crs:PerspectiveHorizontal"`
PerspectiveRotate float32 `xmp:"crs:PerspectiveRotate"`
PerspectiveScale int64 `xmp:"crs:PerspectiveScale"`
CropConstrainToWarp int64 `xmp:"crs:CropConstrainToWarp"`
LuminanceNoiseReductionDetail int64 `xmp:"crs:LuminanceNoiseReductionDetail"`
LuminanceNoiseReductionContrast int64 `xmp:"crs:LuminanceNoiseReductionContrast"`
ColorNoiseReductionDetail int64 `xmp:"crs:ColorNoiseReductionDetail"`
GrainAmount int64 `xmp:"crs:GrainAmount"`
GrainSize int64 `xmp:"crs:GrainSize"`
GrainFrequency int64 `xmp:"crs:GrainFrequency"`
AutoLateralCA int64 `xmp:"crs:AutoLateralCA"`
Exposure2012 float32 `xmp:"crs:Exposure2012"`
Contrast2012 int64 `xmp:"crs:Contrast2012"`
Highlights2012 int64 `xmp:"crs:Highlights2012"`
Shadows2012 int64 `xmp:"crs:Shadows2012"`
Whites2012 int64 `xmp:"crs:Whites2012"`
Blacks2012 int64 `xmp:"crs:Blacks2012"`
Clarity2012 int64 `xmp:"crs:Clarity2012"`
PostCropVignetteHighlightContrast int64 `xmp:"crs:PostCropVignetteHighlightContrast"`
ToneCurveName2012 ToneCurve `xmp:"crs:ToneCurveName2012"`
ToneCurveRed PointList `xmp:"crs:ToneCurveRed"`
ToneCurveGreen PointList `xmp:"crs:ToneCurveGreen"`
ToneCurveBlue PointList `xmp:"crs:ToneCurveBlue"`
ToneCurvePV2012 PointList `xmp:"crs:ToneCurvePV2012"`
ToneCurvePV2012Red PointList `xmp:"crs:ToneCurvePV2012Red"`
ToneCurvePV2012Green PointList `xmp:"crs:ToneCurvePV2012Green"`
ToneCurvePV2012Blue PointList `xmp:"crs:ToneCurvePV2012Blue"`
ToneMapStrength int `xmp:"crs:ToneMapStrength"`
DefringePurpleAmount int64 `xmp:"crs:DefringePurpleAmount"`
DefringePurpleHueLo int64 `xmp:"crs:DefringePurpleHueLo"`
DefringePurpleHueHi int64 `xmp:"crs:DefringePurpleHueHi"`
DefringeGreenAmount int64 `xmp:"crs:DefringeGreenAmount"`
DefringeGreenHueLo int64 `xmp:"crs:DefringeGreenHueLo"`
DefringeGreenHueHi int64 `xmp:"crs:DefringeGreenHueHi"`
AutoWhiteVersion int64 `xmp:"crs:AutoWhiteVersion"`
ColorNoiseReductionSmoothness int64 `xmp:"crs:ColorNoiseReductionSmoothness"`
PerspectiveAspect int64 `xmp:"crs:PerspectiveAspect"`
PerspectiveUpright int64 `xmp:"crs:PerspectiveUpright"`
UprightVersion int64 `xmp:"crs:UprightVersion"`
UprightCenterMode int64 `xmp:"crs:UprightCenterMode"`
UprightCenterNormX float32 `xmp:"crs:UprightCenterNormX"`
UprightCenterNormY float32 `xmp:"crs:UprightCenterNormY"`
UprightFocalMode int64 `xmp:"crs:UprightFocalMode"`
UprightFocalLength35mm float32 `xmp:"crs:UprightFocalLength35mm"`
UprightPreview xmp.Bool `xmp:"crs:UprightPreview"`
UprightTransformCount int64 `xmp:"crs:UprightTransformCount"`
UprightDependentDigest string `xmp:"crs:UprightDependentDigest"`
UprightTransform_0 string `xmp:"crs:UprightTransform_0"`
UprightTransform_1 string `xmp:"crs:UprightTransform_1"`
UprightTransform_2 string `xmp:"crs:UprightTransform_2"`
UprightTransform_3 string `xmp:"crs:UprightTransform_3"`
UprightTransform_4 string `xmp:"crs:UprightTransform_4"`
LensProfileMatchKeyExifMake string `xmp:"crs:LensProfileMatchKeyExifMake"`
LensProfileMatchKeyExifModel string `xmp:"crs:LensProfileMatchKeyExifModel"`
LensProfileMatchKeyCameraModelName string `xmp:"crs:LensProfileMatchKeyCameraModelName"`
LensProfileMatchKeyLensInfo string `xmp:"crs:LensProfileMatchKeyLensInfo"`
LensProfileMatchKeyLensID string `xmp:"crs:LensProfileMatchKeyLensID"`
LensProfileMatchKeyLensName string `xmp:"crs:LensProfileMatchKeyLensName"`
LensProfileMatchKeyIsRaw xmp.Bool `xmp:"crs:LensProfileMatchKeyIsRaw"`
LensProfileMatchKeySensorFormatFactor float32 `xmp:"crs:LensProfileMatchKeySensorFormatFactor"`
DefaultAutoTone xmp.Bool `xmp:"crs:DefaultAutoTone"`
DefaultAutoGray xmp.Bool `xmp:"crs:DefaultAutoGray"`
DefaultsSpecificToSerial xmp.Bool `xmp:"crs:DefaultsSpecificToSerial"`
DefaultsSpecificToISO xmp.Bool `xmp:"crs:DefaultsSpecificToISO"`
DNGIgnoreSidecars xmp.Bool `xmp:"crs:DNGIgnoreSidecars"`
NegativeCachePath string `xmp:"crs:NegativeCachePath"`
NegativeCacheMaximumSize float32 `xmp:"crs:NegativeCacheMaximumSize"`
NegativeCacheLargePreviewSize int64 `xmp:"crs:NegativeCacheLargePreviewSize"`
JPEGHandling string `xmp:"crs:JPEGHandling"`
TIFFHandling string `xmp:"crs:TIFFHandling"`
GradientBasedCorrections CorrectionList `xmp:"crs:GradientBasedCorrections"`
CircularGradientBasedCorrections CorrectionList `xmp:"crs:CircularGradientBasedCorrections"`
PaintBasedCorrections CorrectionList `xmp:"crs:PaintBasedCorrections"`
RetouchAreas RetouchAreaList `xmp:"crs:RetouchAreas"`
}
Part 2: 3.3 Camera Raw namespace
func FindModel ¶
func FindModel(d *xmp.Document) *CameraRawInfo
func (CameraRawInfo) Can ¶
func (x CameraRawInfo) Can(nsName string) bool
func (*CameraRawInfo) CanTag ¶
func (x *CameraRawInfo) CanTag(tag string) bool
func (CameraRawInfo) Namespaces ¶
func (x CameraRawInfo) Namespaces() xmp.NamespaceList
func (*CameraRawInfo) SetTag ¶
func (x *CameraRawInfo) SetTag(tag, value string) error
func (*CameraRawInfo) SyncFromXMP ¶
func (x *CameraRawInfo) SyncFromXMP(d *xmp.Document) error
type Correction ¶
type Correction struct {
What string `xmp:"crs:What,attr"`
CorrectionAmount float32 `xmp:"crs:CorrectionAmount,attr"`
CorrectionActive xmp.Bool `xmp:"crs:CorrectionActive,attr"`
LocalExposure float32 `xmp:"crs:LocalExposure,attr"`
LocalSaturation float32 `xmp:"crs:LocalSaturation,attr"`
LocalContrast float32 `xmp:"crs:LocalContrast,attr"`
LocalBrightness float32 `xmp:"crs:LocalBrightness,attr"`
LocalClarity float32 `xmp:"crs:LocalClarity,attr"`
LocalSharpness float32 `xmp:"crs:LocalSharpness,attr"`
LocalToningHue float32 `xmp:"crs:LocalToningHue,attr"`
LocalToningSaturation float32 `xmp:"crs:LocalToningSaturation,attr"`
LocalExposure2012 float32 `xmp:"crs:LocalExposure2012,attr"`
LocalContrast2012 float32 `xmp:"crs:LocalContrast2012,attr"`
LocalHighlights2012 float32 `xmp:"crs:LocalHighlights2012,attr"`
LocalShadows2012 float32 `xmp:"crs:LocalShadows2012,attr"`
LocalClarity2012 float32 `xmp:"crs:LocalClarity2012,attr"`
LocalLuminanceNoise float32 `xmp:"crs:LocalLuminanceNoise,attr"`
LocalMoire float32 `xmp:"crs:LocalMoire,attr"`
LocalDefringe float32 `xmp:"crs:LocalDefringe,attr"`
LocalTemperature float32 `xmp:"crs:LocalTemperature,attr"`
LocalTint float32 `xmp:"crs:LocalTint,attr"`
CorrectionMasks CorrectionMaskList `xmp:"crs:CorrectionMasks"`
}
type CorrectionList ¶
type CorrectionList []Correction
func (CorrectionList) MarshalXMP ¶
func (CorrectionList) Typ ¶
func (x CorrectionList) Typ() xmp.ArrayType
func (*CorrectionList) UnmarshalXMP ¶
type CorrectionMask ¶
type CorrectionMask struct {
What string `xmp:"crs:What,attr"`
MaskValue float32 `xmp:"crs:MaskValue,attr"`
Radius float32 `xmp:"crs:Radius,attr"`
Flow float32 `xmp:"crs:Flow,attr"`
CenterWeight float32 `xmp:"crs:CenterWeight,attr"`
Dabs xmp.StringList `xmp:"crs:Dabs"`
ZeroX float32 `xmp:"crs:ZeroX,attr"`
ZeroY float32 `xmp:"crs:ZeroY,attr"`
FullX float32 `xmp:"crs:FullX,attr"`
FullY float32 `xmp:"crs:FullY,attr"`
Top float32 `xmp:"crs:Top,attr"`
Left float32 `xmp:"crs:Left,attr"`
Bottom float32 `xmp:"crs:Bottom,attr"`
Right float32 `xmp:"crs:Right,attr"`
Angle float32 `xmp:"crs:Angle,attr"`
Midpoint float32 `xmp:"crs:Midpoint,attr"`
Roundness float32 `xmp:"crs:Roundness,attr"`
Feather float32 `xmp:"crs:Feather,attr"`
Flipped xmp.Bool `xmp:"crs:Flipped,attr"`
Version int64 `xmp:"crs:Version,attr"`
SizeX float32 `xmp:"crs:SizeX,attr"`
SizeY float32 `xmp:"crs:SizeY,attr"`
X float32 `xmp:"crs:X,attr"`
Y float32 `xmp:"crs:Y,attr"`
Alpha float32 `xmp:"crs:Alpha,attr"`
CenterValue float32 `xmp:"crs:CenterValue,attr"`
PerimeterValue float32 `xmp:"crs:PerimeterValue,attr"`
}
type CorrectionMaskList ¶
type CorrectionMaskList []CorrectionMask
func (CorrectionMaskList) MarshalXMP ¶
func (CorrectionMaskList) Typ ¶
func (x CorrectionMaskList) Typ() xmp.ArrayType
func (*CorrectionMaskList) UnmarshalXMP ¶
type RetouchArea ¶
type RetouchArea struct {
SpotType string `xmp:"crs:SpotType,attr"` // heal
SourceState string `xmp:"crs:SourceState,attr"` // sourceSetExplicitly
Method string `xmp:"crs:Method,attr"` // gaussian
SourceX float32 `xmp:"crs:SourceX,attr"`
OffsetY float32 `xmp:"crs:OffsetY,attr"`
Opacity float32 `xmp:"crs:Opacity,attr"`
Feather float32 `xmp:"crs:Feather,attr"`
Seed int64 `xmp:"crs:Seed,attr"`
Masks CorrectionMaskList `xmp:"crs:Masks"`
}
type RetouchAreaList ¶
type RetouchAreaList []RetouchArea
func (RetouchAreaList) MarshalXMP ¶
func (RetouchAreaList) Typ ¶
func (x RetouchAreaList) Typ() xmp.ArrayType
func (*RetouchAreaList) UnmarshalXMP ¶
type RetouchInfo ¶
type RetouchInfo struct {
SpotType string
SourceState string
CenterX float32
CenterY float32
Radius float32
SourceX float32
SourceY float32
}
TODO: (Un)MarshalText <rdf:li>centerX = 0.290216, centerY = 0.190122, radius = 0.005845, sourceState = sourceSetExplicitly, sourceX = 0.260958, sourceY = 0.189526, spotType = heal</rdf:li>
type WhiteBalance ¶
type WhiteBalance string
const ( WhiteBalanceAsShot WhiteBalance = "As Shot" WhiteBalanceAuto WhiteBalance = "Auto" WhiteBalanceDaylight WhiteBalance = "Daylight" WhiteBalanceCloudy WhiteBalance = "Cloudy" WhiteBalanceShade WhiteBalance = "Shade" WhiteBalanceTungsten WhiteBalance = "Tungsten" WhiteBalanceFluorescent WhiteBalance = "Fluorescent" WhiteBalanceFlash WhiteBalance = "Flash" WhiteBalanceCustom WhiteBalance = "Custom" )
Click to show internal directories.
Click to hide internal directories.