BitmapFrame.Create 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
제공된 인수를 기반으로 새 BitmapFrame 인수를 만듭니다.
오버로드
| Name | Description |
|---|---|
| Create(Stream) |
지정된 BitmapFrame.에서 새 Stream 개체를 만듭니다. |
| Create(Uri) |
지정된 BitmapFrame.에서 새 Uri 개체를 만듭니다. |
| Create(BitmapSource) |
지정된 BitmapFrame.에서 새 BitmapSource 개체를 만듭니다. |
| Create(Uri, RequestCachePolicy) |
BitmapFrame 지정된 Uri을 사용하여 지정된 RequestCachePolicy 에서 a를 만듭니다. |
| Create(BitmapSource, BitmapSource) |
지정된 썸네일을 사용하여 지정된 BitmapFrame 썸네일에서 새 BitmapSource 썸네일을 만듭니다. |
| Create(Stream, BitmapCreateOptions, BitmapCacheOption) |
지정된 BitmapFrameStream및 .을 BitmapCreateOptions 사용하여 지정된 BitmapCacheOption 새 개체를 만듭니다. |
| Create(Uri, BitmapCreateOptions, BitmapCacheOption) |
지정된 및 .을 BitmapFrame 사용하여 지정된 Uri 위치에서 a를 BitmapCreateOptionsBitmapCacheOption만듭니다. |
| Create(Uri, BitmapCreateOptions, BitmapCacheOption, RequestCachePolicy) |
BitmapFrame 지정된 , 및 Uri.를 사용하여 지정된 BitmapCreateOptions 위치에서 a를 BitmapCacheOptionRequestCachePolicy만듭니다. |
| Create(BitmapSource, BitmapSource, BitmapMetadata, ReadOnlyCollection<ColorContext>) |
지정된 썸네일을 사용하여 지정된 BitmapFrame 썸네일에서 새 BitmapSource 썸네일BitmapMetadata을 ColorContext만듭니다. |
Create(Stream)
지정된 BitmapFrame.에서 새 Stream 개체를 만듭니다.
public:
static System::Windows::Media::Imaging::BitmapFrame ^ Create(System::IO::Stream ^ bitmapStream);
public static System.Windows.Media.Imaging.BitmapFrame Create(System.IO.Stream bitmapStream);
static member Create : System.IO.Stream -> System.Windows.Media.Imaging.BitmapFrame
Public Shared Function Create (bitmapStream As Stream) As BitmapFrame
매개 변수
- bitmapStream
- Stream
를 Stream 생성하는 BitmapFrame데 사용되는 값입니다.
반품
지정된 BitmapFrame에서 AStream.
설명
bitmapStream 캐시 옵션을 사용하는 경우에만 프레임을 만든 후에 닫을 OnLoad 수 있습니다. 기본 OnDemand 캐시 옵션은 프레임이 필요할 때까지 스트림을 유지합니다. 메서드를 Create(Stream, BitmapCreateOptions, BitmapCacheOption) 사용하여 만들기 및 캐시 옵션을 지정합니다.
적용 대상
Create(Uri)
지정된 BitmapFrame.에서 새 Uri 개체를 만듭니다.
public:
static System::Windows::Media::Imaging::BitmapFrame ^ Create(Uri ^ bitmapUri);
public static System.Windows.Media.Imaging.BitmapFrame Create(Uri bitmapUri);
static member Create : Uri -> System.Windows.Media.Imaging.BitmapFrame
Public Shared Function Create (bitmapUri As Uri) As BitmapFrame
매개 변수
- bitmapUri
- Uri
의 Uri 원본을 식별하는 값입니다 BitmapFrame.
반품
지정된 BitmapFrame에서 AUri.
예제
다음 코드 예제에서는 지정된BitmapFrame에서 생성 하는 Uri 방법을 보여 줍니다.
int width = 128;
int height = width;
int stride = width/8;
byte[] pixels = new byte[height*stride];
// Try creating a new image with a custom palette.
List<System.Windows.Media.Color> colors = new List<System.Windows.Media.Color>();
colors.Add(System.Windows.Media.Colors.Red);
colors.Add(System.Windows.Media.Colors.Blue);
colors.Add(System.Windows.Media.Colors.Green);
BitmapPalette myPalette = new BitmapPalette(colors);
// Creates a new empty image with the pre-defined palette
BitmapSource image = BitmapSource.Create(
width,
height,
96,
96,
PixelFormats.Indexed1,
myPalette,
pixels,
stride);
FileStream stream = new FileStream("empty.tif", FileMode.Create);
TiffBitmapEncoder encoder = new TiffBitmapEncoder();
TextBlock myTextBlock = new TextBlock();
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString();
encoder.Frames.Add(BitmapFrame.Create(image));
MessageBox.Show(myPalette.Colors.Count.ToString());
encoder.Save(stream);
Dim width As Integer = 128
Dim height As Integer = width
Dim stride As Integer = CType(width / 8, Integer)
Dim pixels(height * stride) As Byte
' Try creating a new image with a custom palette.
Dim colors As New List(Of System.Windows.Media.Color)()
colors.Add(System.Windows.Media.Colors.Red)
colors.Add(System.Windows.Media.Colors.Blue)
colors.Add(System.Windows.Media.Colors.Green)
Dim myPalette As New BitmapPalette(colors)
' Creates a new empty image with the pre-defined palette
Dim image As BitmapSource = System.Windows.Media.Imaging.BitmapSource.Create(width, height, 96, 96, PixelFormats.Indexed1, myPalette, pixels, stride)
Dim stream As New FileStream("empty.tif", FileMode.Create)
Dim encoder As New TiffBitmapEncoder()
Dim myTextBlock As New TextBlock()
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString()
encoder.Frames.Add(BitmapFrame.Create(image))
MessageBox.Show(myPalette.Colors.Count.ToString())
encoder.Save(stream)
적용 대상
Create(BitmapSource)
지정된 BitmapFrame.에서 새 BitmapSource 개체를 만듭니다.
public:
static System::Windows::Media::Imaging::BitmapFrame ^ Create(System::Windows::Media::Imaging::BitmapSource ^ source);
public static System.Windows.Media.Imaging.BitmapFrame Create(System.Windows.Media.Imaging.BitmapSource source);
static member Create : System.Windows.Media.Imaging.BitmapSource -> System.Windows.Media.Imaging.BitmapFrame
Public Shared Function Create (source As BitmapSource) As BitmapFrame
매개 변수
- source
- BitmapSource
BitmapSource 이 BitmapFrame구성에 사용되는 값입니다.
반품
지정된 BitmapFrame에서 ABitmapSource.
적용 대상
Create(Uri, RequestCachePolicy)
BitmapFrame 지정된 Uri을 사용하여 지정된 RequestCachePolicy 에서 a를 만듭니다.
public:
static System::Windows::Media::Imaging::BitmapFrame ^ Create(Uri ^ bitmapUri, System::Net::Cache::RequestCachePolicy ^ uriCachePolicy);
public static System.Windows.Media.Imaging.BitmapFrame Create(Uri bitmapUri, System.Net.Cache.RequestCachePolicy uriCachePolicy);
static member Create : Uri * System.Net.Cache.RequestCachePolicy -> System.Windows.Media.Imaging.BitmapFrame
Public Shared Function Create (bitmapUri As Uri, uriCachePolicy As RequestCachePolicy) As BitmapFrame
매개 변수
- bitmapUri
- Uri
비트맵이 만들어지는 BitmapFrame 위치입니다.
- uriCachePolicy
- RequestCachePolicy
이에 BitmapFrame대한 캐싱 요구 사항입니다.
반품
지정된 BitmapFrame을 가진 지정된 Uri 로부터의 A RequestCachePolicy 입니다.
설명
Create(Uri, RequestCachePolicy) .NET Framework 버전 3.5에 도입되었습니다. 자세한 내용은 버전 및 종속성을 참조하세요.
적용 대상
Create(BitmapSource, BitmapSource)
지정된 썸네일을 사용하여 지정된 BitmapFrame 썸네일에서 새 BitmapSource 썸네일을 만듭니다.
public:
static System::Windows::Media::Imaging::BitmapFrame ^ Create(System::Windows::Media::Imaging::BitmapSource ^ source, System::Windows::Media::Imaging::BitmapSource ^ thumbnail);
public static System.Windows.Media.Imaging.BitmapFrame Create(System.Windows.Media.Imaging.BitmapSource source, System.Windows.Media.Imaging.BitmapSource thumbnail);
static member Create : System.Windows.Media.Imaging.BitmapSource * System.Windows.Media.Imaging.BitmapSource -> System.Windows.Media.Imaging.BitmapFrame
Public Shared Function Create (source As BitmapSource, thumbnail As BitmapSource) As BitmapFrame
매개 변수
- source
- BitmapSource
생성되는 BitmapFrame 원본입니다.
- thumbnail
- BitmapSource
결과 BitmapFrame썸네일 이미지입니다.
반품
지정된 썸네일이 있는 지정된 BitmapFrame 썸네일의 A BitmapSource 입니다.
적용 대상
Create(Stream, BitmapCreateOptions, BitmapCacheOption)
지정된 BitmapFrameStream및 .을 BitmapCreateOptions 사용하여 지정된 BitmapCacheOption 새 개체를 만듭니다.
public:
static System::Windows::Media::Imaging::BitmapFrame ^ Create(System::IO::Stream ^ bitmapStream, System::Windows::Media::Imaging::BitmapCreateOptions createOptions, System::Windows::Media::Imaging::BitmapCacheOption cacheOption);
public static System.Windows.Media.Imaging.BitmapFrame Create(System.IO.Stream bitmapStream, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption);
static member Create : System.IO.Stream * System.Windows.Media.Imaging.BitmapCreateOptions * System.Windows.Media.Imaging.BitmapCacheOption -> System.Windows.Media.Imaging.BitmapFrame
Public Shared Function Create (bitmapStream As Stream, createOptions As BitmapCreateOptions, cacheOption As BitmapCacheOption) As BitmapFrame
매개 변수
- bitmapStream
- Stream
생성 BitmapFrame 되는 스트림입니다.
- createOptions
- BitmapCreateOptions
이 BitmapFrame옵션을 만드는 데 사용되는 옵션입니다.
- cacheOption
- BitmapCacheOption
이 BitmapFrame옵션을 만드는 데 사용되는 캐시 옵션입니다.
반품
BitmapFrame 지정된 StreamBitmapCreateOptions및 .BitmapCacheOption
설명
비트맵을 OnLoad 만든 후 닫 bitmapStream 으려면 캐시 옵션을 사용합니다. 기본 OnDemand 캐시 옵션은 비트맵이 필요하고 정리가 가비지 수집기에서 처리될 때까지 스트림에 대한 액세스를 유지합니다.
적용 대상
Create(Uri, BitmapCreateOptions, BitmapCacheOption)
지정된 및 .을 BitmapFrame 사용하여 지정된 Uri 위치에서 a를 BitmapCreateOptionsBitmapCacheOption만듭니다.
public:
static System::Windows::Media::Imaging::BitmapFrame ^ Create(Uri ^ bitmapUri, System::Windows::Media::Imaging::BitmapCreateOptions createOptions, System::Windows::Media::Imaging::BitmapCacheOption cacheOption);
public static System.Windows.Media.Imaging.BitmapFrame Create(Uri bitmapUri, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption);
static member Create : Uri * System.Windows.Media.Imaging.BitmapCreateOptions * System.Windows.Media.Imaging.BitmapCacheOption -> System.Windows.Media.Imaging.BitmapFrame
Public Shared Function Create (bitmapUri As Uri, createOptions As BitmapCreateOptions, cacheOption As BitmapCacheOption) As BitmapFrame
매개 변수
- bitmapUri
- Uri
비트맵이 만들어지는 BitmapFrame 위치입니다.
- createOptions
- BitmapCreateOptions
이 BitmapFrame옵션을 만드는 데 사용되는 옵션입니다.
- cacheOption
- BitmapCacheOption
이 BitmapFrame옵션을 만드는 데 사용되는 캐시 옵션입니다.
반품
BitmapFrame 지정된 UriBitmapCreateOptions및 .BitmapCacheOption
적용 대상
Create(Uri, BitmapCreateOptions, BitmapCacheOption, RequestCachePolicy)
BitmapFrame 지정된 , 및 Uri.를 사용하여 지정된 BitmapCreateOptions 위치에서 a를 BitmapCacheOptionRequestCachePolicy만듭니다.
public:
static System::Windows::Media::Imaging::BitmapFrame ^ Create(Uri ^ bitmapUri, System::Windows::Media::Imaging::BitmapCreateOptions createOptions, System::Windows::Media::Imaging::BitmapCacheOption cacheOption, System::Net::Cache::RequestCachePolicy ^ uriCachePolicy);
public static System.Windows.Media.Imaging.BitmapFrame Create(Uri bitmapUri, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption, System.Net.Cache.RequestCachePolicy uriCachePolicy);
static member Create : Uri * System.Windows.Media.Imaging.BitmapCreateOptions * System.Windows.Media.Imaging.BitmapCacheOption * System.Net.Cache.RequestCachePolicy -> System.Windows.Media.Imaging.BitmapFrame
Public Shared Function Create (bitmapUri As Uri, createOptions As BitmapCreateOptions, cacheOption As BitmapCacheOption, uriCachePolicy As RequestCachePolicy) As BitmapFrame
매개 변수
- bitmapUri
- Uri
비트맵이 만들어지는 BitmapFrame 위치입니다.
- createOptions
- BitmapCreateOptions
이 BitmapFrame옵션을 만드는 데 사용되는 옵션입니다.
- cacheOption
- BitmapCacheOption
이 BitmapFrame옵션을 만드는 데 사용되는 캐시 옵션입니다.
- uriCachePolicy
- RequestCachePolicy
이에 BitmapFrame대한 캐싱 요구 사항입니다.
반품
BitmapFrame Uri 지정된 BitmapCreateOptionsBitmapCacheOption, 및 RequestCachePolicy.
설명
Create(Uri, BitmapCreateOptions, BitmapCacheOption, RequestCachePolicy) .NET Framework 버전 3.5에 도입되었습니다. 자세한 내용은 버전 및 종속성을 참조하세요.
적용 대상
Create(BitmapSource, BitmapSource, BitmapMetadata, ReadOnlyCollection<ColorContext>)
지정된 썸네일을 사용하여 지정된 BitmapFrame 썸네일에서 새 BitmapSource 썸네일BitmapMetadata을 ColorContext만듭니다.
public:
static System::Windows::Media::Imaging::BitmapFrame ^ Create(System::Windows::Media::Imaging::BitmapSource ^ source, System::Windows::Media::Imaging::BitmapSource ^ thumbnail, System::Windows::Media::Imaging::BitmapMetadata ^ metadata, System::Collections::ObjectModel::ReadOnlyCollection<System::Windows::Media::ColorContext ^> ^ colorContexts);
public static System.Windows.Media.Imaging.BitmapFrame Create(System.Windows.Media.Imaging.BitmapSource source, System.Windows.Media.Imaging.BitmapSource thumbnail, System.Windows.Media.Imaging.BitmapMetadata metadata, System.Collections.ObjectModel.ReadOnlyCollection<System.Windows.Media.ColorContext> colorContexts);
static member Create : System.Windows.Media.Imaging.BitmapSource * System.Windows.Media.Imaging.BitmapSource * System.Windows.Media.Imaging.BitmapMetadata * System.Collections.ObjectModel.ReadOnlyCollection<System.Windows.Media.ColorContext> -> System.Windows.Media.Imaging.BitmapFrame
Public Shared Function Create (source As BitmapSource, thumbnail As BitmapSource, metadata As BitmapMetadata, colorContexts As ReadOnlyCollection(Of ColorContext)) As BitmapFrame
매개 변수
- source
- BitmapSource
BitmapSource 이 BitmapFrame구성에 사용되는 값입니다.
- thumbnail
- BitmapSource
결과 BitmapFrame썸네일 이미지입니다.
- metadata
- BitmapMetadata
이 BitmapFrame데이터와 연결할 메타데이터입니다.
- colorContexts
- ReadOnlyCollection<ColorContext>
이 ColorContextBitmapFrame개체와 연결된 개체입니다.
반품
지정된 썸네일이 있는 지정된 BitmapFrame 썸네일BitmapSource의 A BitmapMetadata 및 ColorContext.