Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
126 lines (117 sloc) 10.2 KB
<Type Name="PngBitmapDecoder" FullName="System.Windows.Media.Imaging.PngBitmapDecoder">
<TypeSignature Language="C#" Value="public sealed class PngBitmapDecoder : System.Windows.Media.Imaging.BitmapDecoder" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit PngBitmapDecoder extends System.Windows.Media.Imaging.BitmapDecoder" />
<TypeSignature Language="DocId" Value="T:System.Windows.Media.Imaging.PngBitmapDecoder" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class PngBitmapDecoder&#xA;Inherits BitmapDecoder" />
<TypeSignature Language="C++ CLI" Value="public ref class PngBitmapDecoder sealed : System::Windows::Media::Imaging::BitmapDecoder" />
<TypeSignature Language="F#" Value="type PngBitmapDecoder = class&#xA; inherit BitmapDecoder" />
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Windows.Media.Imaging.BitmapDecoder</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>Defines a decoder for Portable Network Graphics (PNG) encoded images.</summary>
<remarks>To be added.</remarks>
<altmember cref="T:System.Windows.Media.Imaging.BitmapDecoder" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of <see cref="T:System.Windows.Media.Imaging.PngBitmapDecoder" />.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PngBitmapDecoder (System.IO.Stream bitmapStream, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.IO.Stream bitmapStream, valuetype System.Windows.Media.Imaging.BitmapCreateOptions createOptions, valuetype System.Windows.Media.Imaging.BitmapCacheOption cacheOption) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Media.Imaging.PngBitmapDecoder.#ctor(System.IO.Stream,System.Windows.Media.Imaging.BitmapCreateOptions,System.Windows.Media.Imaging.BitmapCacheOption)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (bitmapStream As Stream, createOptions As BitmapCreateOptions, cacheOption As BitmapCacheOption)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; PngBitmapDecoder(System::IO::Stream ^ bitmapStream, System::Windows::Media::Imaging::BitmapCreateOptions createOptions, System::Windows::Media::Imaging::BitmapCacheOption cacheOption);" />
<MemberSignature Language="F#" Value="new System.Windows.Media.Imaging.PngBitmapDecoder : System.IO.Stream * System.Windows.Media.Imaging.BitmapCreateOptions * System.Windows.Media.Imaging.BitmapCacheOption -&gt; System.Windows.Media.Imaging.PngBitmapDecoder" Usage="new System.Windows.Media.Imaging.PngBitmapDecoder (bitmapStream, createOptions, cacheOption)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="bitmapStream" Type="System.IO.Stream" />
<Parameter Name="createOptions" Type="System.Windows.Media.Imaging.BitmapCreateOptions" />
<Parameter Name="cacheOption" Type="System.Windows.Media.Imaging.BitmapCacheOption" />
</Parameters>
<Docs>
<param name="bitmapStream">The bitmap stream to decode.</param>
<param name="createOptions">Initialization options for the bitmap image.</param>
<param name="cacheOption">The cache method to use for the bitmap image.</param>
<summary>Initializes a new instance of <see cref="T:System.Windows.Media.Imaging.PngBitmapDecoder" /> from the specified file stream with the specified <paramref name="createOptions" /> and <paramref name="cacheOption" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use the <xref:System.Windows.Media.Imaging.BitmapCacheOption.OnLoad> cache option if you wish to close the `bitmapStream` after the decoder is created. The default <xref:System.Windows.Media.Imaging.BitmapCacheOption.OnDemand> cache option retains access to the stream until the bitmap is needed and cleanup is handled by the garbage collector.
## Examples
The following code example demonstrates how to create an instance of and use a <xref:System.Windows.Media.Imaging.PngBitmapDecoder> from a file stream. The decoded image is used as the source of an <xref:System.Windows.Controls.Image> control.
[!code-cpp[pngbitmapdecoderencoder#1](~/samples/snippets/cpp/VS_Snippets_Wpf/PngBitmapDecoderEncoder/CPP/PngEncoderDecoder.cpp#1)]
[!code-csharp[pngbitmapdecoderencoder#1](~/samples/snippets/csharp/VS_Snippets_Wpf/PngBitmapDecoderEncoder/CSharp/PngEncoderDecoder.cs#1)]
[!code-vb[pngbitmapdecoderencoder#1](~/samples/snippets/visualbasic/VS_Snippets_Wpf/PngBitmapDecoderEncoder/VB/PngEncoderDecoder.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="bitmapStream" /> value is <see langword="null" />.</exception>
<exception cref="T:System.IO.FileFormatException">The <paramref name="bitmapStream" /> is not a [!INCLUDE[TLA#tla_png](~/includes/tlasharptla-png-md.md)] encoded image.</exception>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PngBitmapDecoder (Uri bitmapUri, System.Windows.Media.Imaging.BitmapCreateOptions createOptions, System.Windows.Media.Imaging.BitmapCacheOption cacheOption);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Uri bitmapUri, valuetype System.Windows.Media.Imaging.BitmapCreateOptions createOptions, valuetype System.Windows.Media.Imaging.BitmapCacheOption cacheOption) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Media.Imaging.PngBitmapDecoder.#ctor(System.Uri,System.Windows.Media.Imaging.BitmapCreateOptions,System.Windows.Media.Imaging.BitmapCacheOption)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (bitmapUri As Uri, createOptions As BitmapCreateOptions, cacheOption As BitmapCacheOption)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; PngBitmapDecoder(Uri ^ bitmapUri, System::Windows::Media::Imaging::BitmapCreateOptions createOptions, System::Windows::Media::Imaging::BitmapCacheOption cacheOption);" />
<MemberSignature Language="F#" Value="new System.Windows.Media.Imaging.PngBitmapDecoder : Uri * System.Windows.Media.Imaging.BitmapCreateOptions * System.Windows.Media.Imaging.BitmapCacheOption -&gt; System.Windows.Media.Imaging.PngBitmapDecoder" Usage="new System.Windows.Media.Imaging.PngBitmapDecoder (bitmapUri, createOptions, cacheOption)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>PresentationCore</AssemblyName>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netcore-3.0">
<AttributeName>System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="bitmapUri" Type="System.Uri" />
<Parameter Name="createOptions" Type="System.Windows.Media.Imaging.BitmapCreateOptions" />
<Parameter Name="cacheOption" Type="System.Windows.Media.Imaging.BitmapCacheOption" />
</Parameters>
<Docs>
<param name="bitmapUri">The <see cref="T:System.Uri" /> that identifies the bitmap to decode.</param>
<param name="createOptions">Initialization options for the bitmap image.</param>
<param name="cacheOption">The cache method to use for the bitmap image.</param>
<summary>Initializes a new instance of <see cref="T:System.Windows.Media.Imaging.PngBitmapDecoder" /> from the specified <see cref="T:System.Uri" /> with the specified <paramref name="createOptions" /> and <paramref name="cacheOption" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to create an instance of and use a <xref:System.Windows.Media.Imaging.PngBitmapDecoder> from a <xref:System.Uri>. The decoded image is used as the source of an <xref:System.Windows.Controls.Image> control.
[!code-cpp[pngbitmapdecoderencoder#5](~/samples/snippets/cpp/VS_Snippets_Wpf/PngBitmapDecoderEncoder/CPP/PngEncoderDecoder.cpp#5)]
[!code-csharp[pngbitmapdecoderencoder#5](~/samples/snippets/csharp/VS_Snippets_Wpf/PngBitmapDecoderEncoder/CSharp/PngEncoderDecoder.cs#5)]
[!code-vb[pngbitmapdecoderencoder#5](~/samples/snippets/visualbasic/VS_Snippets_Wpf/PngBitmapDecoderEncoder/VB/PngEncoderDecoder.vb#5)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">The <paramref name="bitmapUri" /> value is <see langword="null" />.</exception>
<exception cref="T:System.IO.FileFormatException">The <paramref name="bitmapUri" /> is not a [!INCLUDE[TLA#tla_png](~/includes/tlasharptla-png-md.md)] encoded image.</exception>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.