■ BitmapImage 클래스 : 부분 BitmapImage 객체 생성하기
------------------------------------------------------------------------------------------------------------------------
using System;
using System.Windows;
using System.Windows.Media.Imaging;
#region BitmapImage 객체 생성하기 - CreateBitmapImage(uri, int32Rect)
/// <summary>
/// BitmapImage 객체 생성하기
/// </summary>
/// <param name="uri">URI 객체</param>
/// <param name="int32Rect">Int32Rect 객체</param>
/// <returns>BitmapImage 객체</returns>
public BitmapImage CreateBitmapImage(Uri uri, Int32Rect int32Rect)
{
BitmapImage bitmapImage = new BitmapImage();
bitmapImage.BeginInit();
bitmapImage.UriSource = uri;
bitmapImage.SourceRect = int32Rect;
bitmapImage.EndInit();
return bitmapImage;
}
#endregion
------------------------------------------------------------------------------------------------------------------------
'C# > WPF' 카테고리의 다른 글
[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 클래스 : 부분 BitmapImage 객체 생성하기 (0) | 2014.01.25 |
[C#/WPF] BitmapImage 클래스 : 회전한 BitmapImage 객체 구하기 (0) | 2014.01.25 |
[C#/WPF] <T>KeyFrame 클래스 : KeyTime 속성 사용하기 (0) | 2014.01.23 |
[C#/WPF] LinearGradientBrush 클래스 : 애니메이션 이동 길이 구하기 (0) | 2014.01.23 |
[C#/WPF] Timeline 엘리먼트 : RepeatBehavior 속성 사용하기 (0) | 2014.01.22 |
[C#/WPF] Timeline 엘리먼트 : Duration 속성 사용하기 (0) | 2014.01.22 |
댓글을 달아 주세요