BitmapDecoder.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 virtual System.Collections.ObjectModel.ReadOnlyCollection<System.Windows.Media.Imaging.BitmapFrame> Frames { get; }
member this.Frames : System.Collections.ObjectModel.ReadOnlyCollection<System.Windows.Media.Imaging.BitmapFrame>
Public Overridable ReadOnly Property Frames As ReadOnlyCollection(Of BitmapFrame)

속성 값

ReadOnlyCollection<BitmapFrame>

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

예제

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


// 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)

설명

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

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

적용 대상

추가 정보