LateBoundBitmapDecoder.Frames 속성

정의

비트맵 내에서 개별 프레임의 콘텐츠를 가져옵니다.

public:
 virtual property System::Collections::ObjectModel::ReadOnlyCollection<System::Windows::Media::Imaging::BitmapFrame ^> ^ Frames { System::Collections::ObjectModel::ReadOnlyCollection<System::Windows::Media::Imaging::BitmapFrame ^> ^ get(); };
public override System.Collections.ObjectModel.ReadOnlyCollection<System.Windows.Media.Imaging.BitmapFrame> Frames { get; }
member this.Frames : System.Collections.ObjectModel.ReadOnlyCollection<System.Windows.Media.Imaging.BitmapFrame>
Public Overrides ReadOnly Property Frames As ReadOnlyCollection(Of BitmapFrame)

속성 값

BitmapFrame인스턴스입니다. 이 속성에는 기본값이 없습니다.

예제

다음 예제에서는 a로 사용 BitmapFrame 하는 방법을 보여 줍니다 BitmapSource.


// Open a Stream and decode a TIFF image
Stream imageStreamSource = new FileStream("tulipfarm.tif", FileMode.Open, FileAccess.Read, FileShare.Read);
TiffBitmapDecoder decoder = new TiffBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
BitmapSource bitmapSource = decoder.Frames[0];

// Draw the Image
Image myImage1 = new Image();
myImage1.Source = bitmapSource;
myImage1.Stretch = Stretch.None;
myImage1.Margin = new Thickness(20);
' Open a Stream and decode a TIFF image
Dim imageStreamSource As New FileStream("tulipfarm.tif", FileMode.Open, FileAccess.Read, FileShare.Read)
Dim decoder As New TiffBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default)
Dim bitmapSource As BitmapSource = decoder.Frames(0)

' Draw the Image
Dim myImage1 As New Image()
myImage1.Source = bitmapSource
myImage1.Stretch = Stretch.None
myImage1.Margin = New Thickness(20)

설명

A LateBoundBitmapDecoder 는 비동기적으로 다운로드되므로 콘텐츠를 다운로드하고 디코딩한 후 기본 컬렉션 Frames 이 변경될 수 있습니다. 콘텐츠를 다운로드하는 동안 컬렉션은 항상 하나 이상의 항목을 반환합니다. 다운로드 및 디코딩이 완료되면 BitmapFrame 기본 콘텐츠가 자동으로 변경됩니다. 즉, 컬렉션 개체만 변경할 수 있습니다. 실제 프레임 개체는 동일하게 유지됩니다.

이미지를 다운로드하는 동안 가져온 LateBoundBitmapDecoder 프레임은 프레임 다운로드가 완료될 때까지의 1,1 너비/높이를 반환합니다.

태그가 지정된 TIFF(이미지 파일 형식) 및 GIF(그래픽 교환 형식) 이미지만 둘 이상의 프레임을 지원합니다.

이 속성이 반환하는 모든 BitmapFrame 개체는 고정됩니다.

적용 대상

추가 정보