Created
February 4, 2015 06:20
-
-
Save veigr/c2cc12e2943772a66678 to your computer and use it in GitHub Desktop.
[WinRT][SharpDX]カラースペース変換
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 色変換 | |
SharpDX.WIC.BitmapSource transformSource = frame; | |
if (untaggedOrUnsupported) // TryGetColorContextsの結果 | |
{ | |
// プロファイルが読み込めなかった場合はsRGBを適用するため32bppPBGRAへ変換 | |
var converter = new FormatConverter(factory); | |
converter.Initialize(frame, PixelFormat.Format32bppPBGRA); | |
transformSource = converter; | |
} | |
var transform = new ColorTransform(factory); | |
transform.Initialize(transformSource, srcContext, destContext, PixelFormat.Format32bppPBGRA); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment