C# 클래스 ImageUtility.ColorProfile

The source color for the bitmap The color profile helps converting between the original color space and the internal CIEXYZ color space used in the Bitmap class For now, only standard profiles like Linear, sRGB, Adobe RGB, ProPhoto RGB or any custom chromaticities are supported. I believe it would be overkill to include a library for parsing embedded ICC profiles...
상속: IColorConverter
파일 보기 프로젝트 열기: Patapom/GodComplex 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ILLUMINANT_A float2
ILLUMINANT_D50 float2
ILLUMINANT_D55 float2
ILLUMINANT_D65 float2
ILLUMINANT_E float2

보호된 프로퍼티들

프로퍼티 타입 설명
m_Chromaticities Chromaticities
m_Exposure float
m_Gamma float
m_GammaCurve GAMMA_CURVE
m_InternalConverter IColorConverter
m_RGB2XYZ float4x4
m_XYZ2RGB float4x4
m_bProfileFoundInFile bool

공개 메소드들

메소드 설명
ColorProfile ( BitmapMetadata _MetaData, Bitmap _FileType ) : System

Creates the color profile from metadata embedded in the image file

ColorProfile ( Chromaticities _Chromaticities, GAMMA_CURVE _GammaCurve, float _Gamma ) : System

Creates a color profile from chromaticities

ColorProfile ( STANDARD_PROFILE _Profile ) : System

Build from a standard profile

GammaCorrect ( float c, float _ImageGamma ) : float

Applies gamma correction to the provided color

GammaUnCorrect ( float c, float _ImageGamma ) : float

Un-aplies gamma correction to the provided color

Linear2sRGB ( float c ) : float

Converts from linear space to sRGB Code borrowed from D3DX_DXGIFormatConvert.inl from the DX10 SDK

RGB2XYZ ( float4 _RGB ) : float4

Converts a RGB color to a CIEXYZ color

RGB2XYZ ( float4 _RGB, float4 _XYZ ) : void

Converts a RGB color to a CIEXYZ color

XYZ2RGB ( float4 _XYZ ) : float4

Converts a CIEXYZ color to a RGB color

XYZ2RGB ( float4 _XYZ, float4 _RGB ) : void

Converts a CIEXYZ color to a RGB color

XYZ2xyY ( float3 _XYZ ) : float3

Converts from XYZ to xyY

sRGB2Linear ( float c ) : float

Converts from sRGB to linear space Code borrowed from D3DX_DXGIFormatConvert.inl from the DX10 SDK

xyY2XYZ ( float3 _xyY ) : float3

Converts from xyY to XYZ

보호된 메소드들

메소드 설명
BuildTransformFromChroma ( bool _bCheckGammaCurveOverride ) : void

Builds the RGB<->XYZ transforms from chromaticities (refer to http://wiki.nuaj.net/index.php/Color_Transforms#XYZ_Matrices for explanations)

DumpMetaData ( BitmapMetadata _Root ) : string
DumpMetaData ( BitmapMetadata _Root, string _Tab ) : string
EnsureGamma ( GAMMA_CURVE _Curve, float _Gamma ) : bool

Ensures the current gamma curve type and value are the ones we want

EnumerateMetaData ( BitmapMetadata _Root ) : void
EnumerateMetaDataJPG ( BitmapMetadata _MetaData, bool &_bProfileFound, bool &_bGammaWasSpecified ) : void
EnumerateMetaDataPNG ( BitmapMetadata _MetaData, bool &_bProfileFound, bool &_bGammaWasSpecified ) : void
EnumerateMetaDataTIFF ( BitmapMetadata _MetaData, bool &_bProfileFound, bool &_bGammaWasSpecified ) : void
FindAttribute ( string _XMLContent, string _AttributeName ) : string

Attempts to find an XML attribute by name

FindEXIFColorProfile ( BitmapMetadata _Meta ) : bool

Attempts to find the color profile in the EXIF metadata

FindICCProfileString ( BitmapMetadata _Meta, bool &_bGammaWasSpecified ) : bool

Attempts to find the "photoshop:ICCProfile" string in the metadata dump and retrieve a known profile from it

FindPhotometricInterpretation ( BitmapMetadata _Meta, string _MetaPath ) : bool

Attempts to find the TIFF "PhotometricInterpretation" metadata

HandleEXIFColorSpace ( int _ColorSpace ) : bool

Attempts to handle a color profile from the EXIF ColorSpace tag

HandleEXIFColorSpace ( string _ColorSpace ) : bool
HandleICCProfileString ( string _ProfilName ) : bool

Attempts to handle an ICC profile by name

메소드 상세

BuildTransformFromChroma() 보호된 메소드

Builds the RGB<->XYZ transforms from chromaticities (refer to http://wiki.nuaj.net/index.php/Color_Transforms#XYZ_Matrices for explanations)
protected BuildTransformFromChroma ( bool _bCheckGammaCurveOverride ) : void
_bCheckGammaCurveOverride bool
리턴 void

ColorProfile() 공개 메소드

Creates the color profile from metadata embedded in the image file
public ColorProfile ( BitmapMetadata _MetaData, Bitmap _FileType ) : System
_MetaData BitmapMetadata
_FileType Bitmap
리턴 System

ColorProfile() 공개 메소드

Creates a color profile from chromaticities
public ColorProfile ( Chromaticities _Chromaticities, GAMMA_CURVE _GammaCurve, float _Gamma ) : System
_Chromaticities Chromaticities The chromaticities for this profile
_GammaCurve GAMMA_CURVE The type of gamma curve to use
_Gamma float The gamma power
리턴 System

ColorProfile() 공개 메소드

Build from a standard profile
public ColorProfile ( STANDARD_PROFILE _Profile ) : System
_Profile STANDARD_PROFILE
리턴 System

DumpMetaData() 보호된 메소드

protected DumpMetaData ( BitmapMetadata _Root ) : string
_Root BitmapMetadata
리턴 string

DumpMetaData() 보호된 메소드

protected DumpMetaData ( BitmapMetadata _Root, string _Tab ) : string
_Root BitmapMetadata
_Tab string
리턴 string

EnsureGamma() 보호된 메소드

Ensures the current gamma curve type and value are the ones we want
protected EnsureGamma ( GAMMA_CURVE _Curve, float _Gamma ) : bool
_Curve GAMMA_CURVE
_Gamma float
리턴 bool

EnumerateMetaData() 보호된 메소드

protected EnumerateMetaData ( BitmapMetadata _Root ) : void
_Root BitmapMetadata
리턴 void

EnumerateMetaDataJPG() 보호된 메소드

protected EnumerateMetaDataJPG ( BitmapMetadata _MetaData, bool &_bProfileFound, bool &_bGammaWasSpecified ) : void
_MetaData BitmapMetadata
_bProfileFound bool
_bGammaWasSpecified bool
리턴 void

EnumerateMetaDataPNG() 보호된 메소드

protected EnumerateMetaDataPNG ( BitmapMetadata _MetaData, bool &_bProfileFound, bool &_bGammaWasSpecified ) : void
_MetaData BitmapMetadata
_bProfileFound bool
_bGammaWasSpecified bool
리턴 void

EnumerateMetaDataTIFF() 보호된 메소드

protected EnumerateMetaDataTIFF ( BitmapMetadata _MetaData, bool &_bProfileFound, bool &_bGammaWasSpecified ) : void
_MetaData BitmapMetadata
_bProfileFound bool
_bGammaWasSpecified bool
리턴 void

FindAttribute() 보호된 메소드

Attempts to find an XML attribute by name
protected FindAttribute ( string _XMLContent, string _AttributeName ) : string
_XMLContent string
_AttributeName string
리턴 string

FindEXIFColorProfile() 보호된 메소드

Attempts to find the color profile in the EXIF metadata
protected FindEXIFColorProfile ( BitmapMetadata _Meta ) : bool
_Meta BitmapMetadata
리턴 bool

FindICCProfileString() 보호된 메소드

Attempts to find the "photoshop:ICCProfile" string in the metadata dump and retrieve a known profile from it
protected FindICCProfileString ( BitmapMetadata _Meta, bool &_bGammaWasSpecified ) : bool
_Meta BitmapMetadata
_bGammaWasSpecified bool
리턴 bool

FindPhotometricInterpretation() 보호된 메소드

Attempts to find the TIFF "PhotometricInterpretation" metadata
protected FindPhotometricInterpretation ( BitmapMetadata _Meta, string _MetaPath ) : bool
_Meta BitmapMetadata
_MetaPath string
리턴 bool

GammaCorrect() 공개 정적인 메소드

Applies gamma correction to the provided color
public static GammaCorrect ( float c, float _ImageGamma ) : float
c float The color to gamma-correct
_ImageGamma float The gamma correction the image was encoded with (JPEG is 2.2 for example, if not sure use 1.0)
리턴 float

GammaUnCorrect() 공개 정적인 메소드

Un-aplies gamma correction to the provided color
public static GammaUnCorrect ( float c, float _ImageGamma ) : float
c float The color to gamma-uncorrect
_ImageGamma float The gamma correction the image was encoded with (JPEG is 2.2 for example, if not sure use 1.0)
리턴 float

HandleEXIFColorSpace() 보호된 메소드

Attempts to handle a color profile from the EXIF ColorSpace tag
protected HandleEXIFColorSpace ( int _ColorSpace ) : bool
_ColorSpace int
리턴 bool

HandleEXIFColorSpace() 보호된 메소드

protected HandleEXIFColorSpace ( string _ColorSpace ) : bool
_ColorSpace string
리턴 bool

HandleICCProfileString() 보호된 메소드

Attempts to handle an ICC profile by name
protected HandleICCProfileString ( string _ProfilName ) : bool
_ProfilName string
리턴 bool

Linear2sRGB() 공개 정적인 메소드

Converts from linear space to sRGB Code borrowed from D3DX_DXGIFormatConvert.inl from the DX10 SDK
public static Linear2sRGB ( float c ) : float
c float
리턴 float

RGB2XYZ() 공개 메소드

Converts a RGB color to a CIEXYZ color
public RGB2XYZ ( float4 _RGB ) : float4
_RGB float4
리턴 float4

RGB2XYZ() 공개 메소드

Converts a RGB color to a CIEXYZ color
public RGB2XYZ ( float4 _RGB, float4 _XYZ ) : void
_RGB float4
_XYZ float4
리턴 void

XYZ2RGB() 공개 메소드

Converts a CIEXYZ color to a RGB color
public XYZ2RGB ( float4 _XYZ ) : float4
_XYZ float4
리턴 float4

XYZ2RGB() 공개 메소드

Converts a CIEXYZ color to a RGB color
public XYZ2RGB ( float4 _XYZ, float4 _RGB ) : void
_XYZ float4
_RGB float4
리턴 void

XYZ2xyY() 공개 정적인 메소드

Converts from XYZ to xyY
public static XYZ2xyY ( float3 _XYZ ) : float3
_XYZ float3
리턴 float3

sRGB2Linear() 공개 정적인 메소드

Converts from sRGB to linear space Code borrowed from D3DX_DXGIFormatConvert.inl from the DX10 SDK
public static sRGB2Linear ( float c ) : float
c float
리턴 float

xyY2XYZ() 공개 정적인 메소드

Converts from xyY to XYZ
public static xyY2XYZ ( float3 _xyY ) : float3
_xyY float3
리턴 float3

프로퍼티 상세

ILLUMINANT_A 공개적으로 정적으로 프로퍼티

public static float2,ImageUtility ILLUMINANT_A
리턴 float2

ILLUMINANT_D50 공개적으로 정적으로 프로퍼티

public static float2,ImageUtility ILLUMINANT_D50
리턴 float2

ILLUMINANT_D55 공개적으로 정적으로 프로퍼티

public static float2,ImageUtility ILLUMINANT_D55
리턴 float2

ILLUMINANT_D65 공개적으로 정적으로 프로퍼티

public static float2,ImageUtility ILLUMINANT_D65
리턴 float2

ILLUMINANT_E 공개적으로 정적으로 프로퍼티

public static float2,ImageUtility ILLUMINANT_E
리턴 float2

m_Chromaticities 보호되어 있는 프로퍼티

protected Chromaticities m_Chromaticities
리턴 Chromaticities

m_Exposure 보호되어 있는 프로퍼티

protected float m_Exposure
리턴 float

m_Gamma 보호되어 있는 프로퍼티

protected float m_Gamma
리턴 float

m_GammaCurve 보호되어 있는 프로퍼티

protected GAMMA_CURVE m_GammaCurve
리턴 GAMMA_CURVE

m_InternalConverter 보호되어 있는 프로퍼티

protected IColorConverter m_InternalConverter
리턴 IColorConverter

m_RGB2XYZ 보호되어 있는 프로퍼티

protected float4x4,ImageUtility m_RGB2XYZ
리턴 float4x4

m_XYZ2RGB 보호되어 있는 프로퍼티

protected float4x4,ImageUtility m_XYZ2RGB
리턴 float4x4

m_bProfileFoundInFile 보호되어 있는 프로퍼티

protected bool m_bProfileFoundInFile
리턴 bool