BitmapCreateOptions 열거형

정의

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

이 열거형은 멤버 값의 비트 조합을 지원합니다.

public enum class BitmapCreateOptions
[System.Flags]
public enum BitmapCreateOptions
[<System.Flags>]
type BitmapCreateOptions = 
Public Enum BitmapCreateOptions
상속
BitmapCreateOptions
특성

필드

DelayCreation 2

필요할 때까지 BitmapSource 개체의 초기화를 지연시킵니다. 이미지의 컬렉션을 처리할 때 유용합니다.

IgnoreColorProfile 4

BitmapSource에서 포함된 색 프로필을 무시하도록 합니다.

IgnoreImageCache 8

기존 이미지 캐시를 사용하지 않고 이미지를 로드합니다. 캐시의 이미지를 새로 고쳐야 하는 경우에만 이 옵션을 선택해야 합니다.

None 0

BitmapCreateOptions가 지정되지 않았습니다. 기본값입니다.

PreservePixelFormat 1

PixelFormat 파일이 로드된 위치에 저장되도록 합니다.

예제

다음 예제에서는 열거형 값을 인스턴스화 BitmapImage 하고 지정하는 BitmapCreateOptions 방법을 보여 줍니다.

// Define a BitmapImage.
Image myImage = new Image();
BitmapImage bi = new BitmapImage();

// Begin initialization.
bi.BeginInit();

// Set properties.
bi.CacheOption = BitmapCacheOption.OnDemand;
bi.CreateOptions = BitmapCreateOptions.DelayCreation;
bi.DecodePixelHeight = 125;
bi.DecodePixelWidth = 125;
bi.Rotation = Rotation.Rotate90;
MessageBox.Show(bi.IsDownloading.ToString());
bi.UriSource = new Uri("smiley.png", UriKind.Relative);

// End initialization.
bi.EndInit();
myImage.Source = bi;
myImage.Stretch = Stretch.None;
myImage.Margin = new Thickness(5);
' Define a BitmapImage.
Dim myImage As New Image()
Dim bi As New BitmapImage()

' Begin initialization.
bi.BeginInit()

' Set properties.
bi.CacheOption = BitmapCacheOption.OnDemand
bi.CreateOptions = BitmapCreateOptions.DelayCreation
bi.DecodePixelHeight = 125
bi.DecodePixelWidth = 125
bi.Rotation = Rotation.Rotate90
MessageBox.Show(bi.IsDownloading.ToString())
bi.UriSource = New Uri("smiley.png", UriKind.Relative)

' End initialization.
bi.EndInit()
myImage.Source = bi
myImage.Stretch = Stretch.None
myImage.Margin = New Thickness(5)

설명

설정 PixelFormat 되지 않은 경우 PreservePixelFormat 시스템에서 결정하는 내용에 따라 이미지의 이미지가 선택되어 최상의 성능을 얻을 수 있습니다. 이 옵션을 사용 하면 파일 형식이 그대로 유지 되지만 성능은 저하 될 수 있습니다.

설정된 경우 IgnoreColorProfile 와 같은 CopyPixels(Array, Int32, Int32) 메서드를 호출해도 색이 수정된 비트는 반환되지 않습니다.

설정된 경우 IgnoreImageCache 이미지 캐시의 기존 항목은 동일한 Uri항목을 공유하더라도 대체됩니다.

적용 대상

추가 정보