CachedBitmap(BitmapSource, BitmapCreateOptions, BitmapCacheOption) 생성자

정의

지정된 원본, 비트맵 만들기 옵션 및 비트맵 캐시 옵션이 있는 새 인스턴스 CachedBitmap 를 초기화합니다.

public:
 CachedBitmap(System::Windows::Media::Imaging::BitmapSource ^ source, System::Windows::Media::Imaging::BitmapCreateOptions createOptions, System::Windows::Media::Imaging::BitmapCacheOption cacheOption);
public CachedBitmap(System.Windows.Media.Imaging.BitmapSource source, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption);
new System.Windows.Media.Imaging.CachedBitmap : System.Windows.Media.Imaging.BitmapSource * System.Windows.Media.Imaging.BitmapCreateOptions * System.Windows.Media.Imaging.BitmapCacheOption -> System.Windows.Media.Imaging.CachedBitmap
Public Sub New (source As BitmapSource, createOptions As BitmapCreateOptions, cacheOption As BitmapCacheOption)

매개 변수

source
BitmapSource

캐시되는 원본 비트맵입니다.

createOptions
BitmapCreateOptions

비트맵 이미지에 대한 초기화 옵션입니다.

cacheOption
BitmapCacheOption

비트맵이 메모리에 캐시되는 방법을 지정합니다.

예외

가 있는 경우에 sourcenull발생합니다.

예제

다음 코드 예제에서는 코드에서 만들고 사용하는 CachedBitmap 방법을 보여 있습니다.


CachedBitmap cachedSource = new CachedBitmap(
    scaledSource, 
    BitmapCreateOptions.None,
    BitmapCacheOption.OnLoad);


// Create a new BitmapSource using a different format than the original one.
FormatConvertedBitmap newFormatSource = new FormatConvertedBitmap();
newFormatSource.BeginInit();
newFormatSource.Source = cachedSource;
newFormatSource.DestinationFormat = PixelFormats.Gray32Float;
newFormatSource.EndInit();
Dim cachedSource As New CachedBitmap(scaledSource, BitmapCreateOptions.None, BitmapCacheOption.OnLoad)
' Create a new BitmapSource using a different format than the original one.
Dim newFormatSource As New FormatConvertedBitmap()
newFormatSource.BeginInit()
newFormatSource.Source = cachedSource
newFormatSource.DestinationFormat = PixelFormats.Gray32Float
newFormatSource.EndInit()

적용 대상

추가 정보