728x90
반응형
728x170
using System;
using System.Windows.Media;
#region 색상 값 구하기 - GetColorValue(color)
/// <summary>
/// 색상 값 구하기
/// </summary>
/// <param name="color">Color 객체</param>
/// <returns>색상 값</returns>
public int GetColorValue(Color color)
{
return BitConverter.ToInt32 (new byte [] { color.B, color.G, color.R, color.A }, 0);
}
#endregion
※ 알파 값 미적용시 color.A를 0xff로 대체한다.
728x90
반응형
그리드형(광고전용)
'C# > WPF' 카테고리의 다른 글
[C#/WPF] BitmapSource 클래스 : 픽셀 바이트 배열 구하기 (0) | 2014.01.26 |
---|---|
[C#/WPF] RenderTargetBitmap 클래스 : MediaPlayer 객체에서 비트맵 구하기 (0) | 2014.01.26 |
[C#/WPF] MediaPlayer 클래스 : 재생하기 (0) | 2014.01.26 |
[C#/WPF] MediaPlayer 클래스 : 비디오 크기 구하기 (0) | 2014.01.26 |
[C#/WPF] BitConverter 클래스 : Color 객체 구하기 (0) | 2014.01.26 |
[C#/WPF] TransformedBitmap 클래스 : 변환 비트맵 생성하기 (0) | 2014.01.26 |
[C#/WPF] BitmapSource 클래스 : JPEG 파일 저장하기 (0) | 2014.01.26 |
[C#/WPF] DrawingVisual 클래스 : 라운드 사각형 이미지 구하기 (0) | 2014.01.25 |
[C#/WPF] RenderTargetBitmap 클래스 : DrawingVisual 객체에서 비트맵 구하기 (0) | 2014.01.25 |
[C#/WPF] BitmapImage 클래스 : 부분 비트맵 이미지 구하기 (0) | 2014.01.25 |
댓글을 달아 주세요