Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
2265 lines (2084 sloc) 148 KB
<Type Name="Image" FullName="System.Drawing.Image">
<TypeSignature Language="C#" Value="public abstract class Image : MarshalByRefObject, ICloneable, IDisposable, System.Runtime.Serialization.ISerializable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract serializable beforefieldinit Image extends System.MarshalByRefObject implements class System.ICloneable, class System.IDisposable, class System.Runtime.Serialization.ISerializable" />
<TypeSignature Language="DocId" Value="T:System.Drawing.Image" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class Image&#xA;Inherits MarshalByRefObject&#xA;Implements ICloneable, IDisposable, ISerializable" />
<TypeSignature Language="C++ CLI" Value="public ref class Image abstract : MarshalByRefObject, ICloneable, IDisposable, System::Runtime::Serialization::ISerializable" />
<TypeSignature Language="F#" Value="type Image = class&#xA; inherit MarshalByRefObject&#xA; interface ISerializable&#xA; interface ICloneable&#xA; interface IDisposable" />
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.MarshalByRefObject</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.ICloneable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="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">
<AttributeName>System.ComponentModel.Editor("System.Drawing.Design.ImageEditor, System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.ImmutableObject(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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">
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.Drawing.ImageConverter))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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">
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1">
<AttributeName>System.ComponentModel.Editor("System.Drawing.Design.ImageEditor, System.Drawing.Design, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName>System.ComponentModel.Editor("System.Drawing.Design.ImageEditor, System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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">
<AttributeName>System.Serializable</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.TypeConverter("System.Drawing.ImageConverter, System.Windows.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>An abstract base class that provides functionality for the <see cref="T:System.Drawing.Bitmap" /> and <see cref="T:System.Drawing.Imaging.Metafile" /> descended classes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To draw an <xref:System.Drawing.Image> on a Windows Form, you should use one of the <xref:System.Drawing.Graphics.DrawImage%2A> methods.
## Examples
The following code example is designed for use with Windows Forms. It is a handler for the <xref:System.Windows.Forms.Control.Paint> event. A <xref:System.Drawing.Graphics> object is passed to the event and is used to draw the image on the form. The code performs the following actions:
- Creates an image from a file named SampImag.jpg. This file must be located in the same folder as the application executable file.
- Creates a point at which to draw the upper-left corner of the image.
- Draws the unscaled image on the form.
[!code-cpp[System.Drawing.ClassicGraphicsExamples#55](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CPP/form1.cpp#55)]
[!code-csharp[System.Drawing.ClassicGraphicsExamples#55](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/CS/form1.cs#55)]
[!code-vb[System.Drawing.ClassicGraphicsExamples#55](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicGraphicsExamples/VB/form1.vb#55)]
]]></format>
</remarks>
<related type="Article" href="https://msdn.microsoft.com/library/7152b45b-a55c-49bc-8c78-ae002a844f71">Images, Bitmaps, and Metafiles</related>
<related type="Article" href="https://msdn.microsoft.com/library/a626d701-bd99-4fd8-b92f-7b8f794e042b">Working with Images, Bitmaps, Icons, and Metafiles</related>
</Docs>
<Members>
<Member MemberName="Clone">
<MemberSignature Language="C#" Value="public object Clone ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object Clone() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.Clone" />
<MemberSignature Language="VB.NET" Value="Public Function Clone () As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::Object ^ Clone();" />
<MemberSignature Language="F#" Value="abstract member Clone : unit -&gt; obj&#xA;override this.Clone : unit -&gt; obj" Usage="image.Clone " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ICloneable.Clone</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Creates an exact copy of this <see cref="T:System.Drawing.Image" />.</summary>
<returns>The <see cref="T:System.Drawing.Image" /> this method creates, cast as an object.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Dispose">
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Releases all resources used by this <see cref="T:System.Drawing.Image" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> Always call <xref:System.Drawing.Image.Dispose%2A> before you release your last reference to the <xref:System.Drawing.Image>. Otherwise, the resources it is using will not be freed until the garbage collector calls the <xref:System.Drawing.Image> object's `Finalize` method.
]]></format>
</remarks>
</Docs>
</MemberGroup>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -&gt; unit&#xA;override this.Dispose : unit -&gt; unit" Usage="image.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Releases all resources used by this <see cref="T:System.Drawing.Image" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Calling the <xref:System.Drawing.Image.Dispose%2A> method allows the resources used by this <xref:System.Drawing.Image> to be reallocated for other purposes.
Call <xref:System.Drawing.Image.Dispose%2A> when you are finished using the <xref:System.Drawing.Image>. The <xref:System.Drawing.Image.Dispose%2A> method leaves the <xref:System.Drawing.Image> in an unusable state. After calling <xref:System.Drawing.Image.Dispose%2A>, you must release all references to the <xref:System.Drawing.Image> so the garbage collector can reclaim the memory that the <xref:System.Drawing.Image> was occupying. For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md) and [Implementing a Dispose Method](~/docs/standard/garbage-collection/implementing-dispose.md).
> [!NOTE]
> Always call <xref:System.Drawing.Image.Dispose%2A> before you release your last reference to the <xref:System.Drawing.Image>. Otherwise, the resources it is using will not be freed until the garbage collector calls the <xref:System.Drawing.Image> object's `Finalize` method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void Dispose(bool disposing);" />
<MemberSignature Language="F#" Value="abstract member Dispose : bool -&gt; unit&#xA;override this.Dispose : bool -&gt; unit" Usage="image.Dispose disposing" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="disposing">
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.</param>
<summary>Releases the unmanaged resources used by the <see cref="T:System.Drawing.Image" /> and optionally releases the managed resources.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
> [!NOTE]
> Always call <xref:System.Drawing.Image.Dispose%2A> before you release your last reference to the <xref:System.Drawing.Image>. Otherwise, the resources it is using will not be freed until the garbage collector calls the <xref:System.Drawing.Image> object's `Finalize` method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Finalize">
<MemberSignature Language="C#" Value="~Image ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Finalize() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.Finalize" />
<MemberSignature Language="VB.NET" Value="Finalize ()" />
<MemberSignature Language="C++ CLI" Value="!Image ()" />
<MemberSignature Language="F#" Value="override this.Finalize : unit -&gt; unit" Usage="image.Finalize " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Flags">
<MemberSignature Language="C#" Value="public int Flags { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Flags" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.Flags" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Flags As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Flags { int get(); };" />
<MemberSignature Language="F#" Value="member this.Flags : int" Usage="System.Drawing.Image.Flags" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets attribute flags for the pixel data of this <see cref="T:System.Drawing.Image" />.</summary>
<value>The integer representing a bitwise combination of <see cref="T:System.Drawing.Imaging.ImageFlags" /> for this <see cref="T:System.Drawing.Image" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The integer value returned from this method will correspond to a sum of <xref:System.Drawing.Imaging.ImageFlags>, as described in the following table.
|ImageFlag value|Integer representation|
|---------------------|----------------------------|
|`ImageFlagsNone`|0|
|`ImageFlagsScalable`|1|
|`ImageFlagsHasAlpha`|2|
|`ImageFlagsHasTranslucent`|4|
|`ImageFlagsPartiallyScalable`|8|
|`ImageFlagsColorSpaceRGB`|16|
|`ImageFlagsColorSpaceCMYK`|32|
|`ImageFlagsColorSpaceGRAY`|64|
|`ImageFlagsColorSpaceYCBCR`|128|
|`ImageFlagsColorSpaceYCCK`|256|
|`ImageFlagsHasRealDPI`|4096|
|`ImageFlagsHasRealPixelSize`|8192|
|`ImageFlagsReadOnly`|65536|
|`ImageFlagsCaching`|131072|
For example, if the <xref:System.Drawing.Image.Flags%2A> property for an image returned 77960, the <xref:System.Drawing.Imaging.ImageFlags> for the image would be <xref:System.Drawing.Imaging.ImageFlags.ReadOnly>, <xref:System.Drawing.Imaging.ImageFlags.HasRealDpi>, <xref:System.Drawing.Imaging.ImageFlags.HasRealPixelSize>, <xref:System.Drawing.Imaging.ImageFlags.ColorSpaceYcbcr>, and <xref:System.Drawing.Imaging.ImageFlags.PartiallyScalable>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="FrameDimensionsList">
<MemberSignature Language="C#" Value="public Guid[] FrameDimensionsList { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Guid[] FrameDimensionsList" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.FrameDimensionsList" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property FrameDimensionsList As Guid()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property cli::array &lt;Guid&gt; ^ FrameDimensionsList { cli::array &lt;Guid&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.FrameDimensionsList : Guid[]" Usage="System.Drawing.Image.FrameDimensionsList" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Guid[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets an array of GUIDs that represent the dimensions of frames within this <see cref="T:System.Drawing.Image" />.</summary>
<value>An array of GUIDs that specify the dimensions of frames within this <see cref="T:System.Drawing.Image" /> from most significant to least significant.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method returns information about multiple-frame images, which come in two styles: multiple page and multiple resolution.
A multiple-page image is an image that contains more than one image. Each page contains a single image (or frame). These pages (or images, or frames) are typically displayed in succession to produce an animated sequence, such as an animated .gif file.
A multiple-resolution image is an image that contains more than one copy of an image at different resolutions. This is commonly used by MIP mapping where the displayed image size determines the resolution of the image used for drawing. [!INCLUDE[ndptecgdiplus](~/includes/ndptecgdiplus-md.md)] can support an arbitrary number of pages (or images, or frames), as well as an arbitrary number of resolutions. The defined dimensions are properties of the <xref:System.Drawing.Imaging.FrameDimension>.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="FromFile">
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Creates an <see cref="T:System.Drawing.Image" /> from the specified file.</summary>
</Docs>
</MemberGroup>
<Member MemberName="FromFile">
<MemberSignature Language="C#" Value="public static System.Drawing.Image FromFile (string filename);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Drawing.Image FromFile(string filename) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.FromFile(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromFile (filename As String) As Image" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Drawing::Image ^ FromFile(System::String ^ filename);" />
<MemberSignature Language="F#" Value="static member FromFile : string -&gt; System.Drawing.Image" Usage="System.Drawing.Image.FromFile filename" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Image</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
</Parameters>
<Docs>
<param name="filename">A string that contains the name of the file from which to create the <see cref="T:System.Drawing.Image" />.</param>
<summary>Creates an <see cref="T:System.Drawing.Image" /> from the specified file.</summary>
<returns>The <see cref="T:System.Drawing.Image" /> this method creates.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Managed GDI+ has built-in encoders and decoders that support the following file types:
- BMP
- GIF
- JPEG
- PNG
- TIFF
The file remains locked until the <xref:System.Drawing.Image> is disposed.
If the file does not have a valid image format or if [!INCLUDE[ndptecgdiplus](~/includes/ndptecgdiplus-md.md)] does not support the pixel format of the file, this method throws an <xref:System.OutOfMemoryException> exception.
> [!NOTE]
> The <xref:System.Drawing.Image> class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
## Examples
The following code example demonstrates how to use the <xref:System.Drawing.Image.FromFile%2A><xref:System.Drawing.Image.GetPropertyItem%2A> and <xref:System.Drawing.Image.SetPropertyItem%2A> methods. This example is designed to be used with Windows Forms. To run this example, paste it into a form, and handle the form's <xref:System.Windows.Forms.Control.Paint> event by calling the `DemonstratePropertyItem` method, passing `e` as <xref:System.Windows.Forms.PaintEventArgs>.
[!code-cpp[System.Drawing.ImageExample#7](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp#7)]
[!code-csharp[System.Drawing.ImageExample#7](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs#7)]
[!code-vb[System.Drawing.ImageExample#7](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb#7)]
]]></format>
</remarks>
<exception cref="T:System.OutOfMemoryException">The file does not have a valid image format.
-or-
[!INCLUDE[ndptecgdiplus](~/includes/ndptecgdiplus-md.md)] does not support the pixel format of the file.</exception>
<exception cref="T:System.IO.FileNotFoundException">The specified file does not exist.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="filename" /> is a <see cref="T:System.Uri" />.</exception>
<related type="Article" href="https://msdn.microsoft.com/library/6be085a2-2c13-47c8-b80a-c18b32777d8d">Types of Bitmaps</related>
</Docs>
</Member>
<Member MemberName="FromFile">
<MemberSignature Language="C#" Value="public static System.Drawing.Image FromFile (string filename, bool useEmbeddedColorManagement);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Drawing.Image FromFile(string filename, bool useEmbeddedColorManagement) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.FromFile(System.String,System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromFile (filename As String, useEmbeddedColorManagement As Boolean) As Image" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Drawing::Image ^ FromFile(System::String ^ filename, bool useEmbeddedColorManagement);" />
<MemberSignature Language="F#" Value="static member FromFile : string * bool -&gt; System.Drawing.Image" Usage="System.Drawing.Image.FromFile (filename, useEmbeddedColorManagement)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Image</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
<Parameter Name="useEmbeddedColorManagement" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="filename">A string that contains the name of the file from which to create the <see cref="T:System.Drawing.Image" />.</param>
<param name="useEmbeddedColorManagement">Set to <see langword="true" /> to use color management information embedded in the image file; otherwise, <see langword="false" />.</param>
<summary>Creates an <see cref="T:System.Drawing.Image" /> from the specified file using embedded color management information in that file.</summary>
<returns>The <see cref="T:System.Drawing.Image" /> this method creates.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Managed GDI+ has built-in encoders and decoders that support the following file types:
- BMP
- GIF
- JPEG
- PNG
- TIFF
If the file does not have a valid image format or if [!INCLUDE[ndptecgdiplus](~/includes/ndptecgdiplus-md.md)] does not support the pixel format of the file, this method throws an <xref:System.OutOfMemoryException> exception.
The file remains locked until the <xref:System.Drawing.Image> is disposed.
The `useEmbeddedColorManagement` parameter specifies whether the new <xref:System.Drawing.Image> applies color correction according to color management information that is embedded in the image file. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
> [!NOTE]
> The <xref:System.Drawing.Image> class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
## Examples
The following code example demonstrates how to obtain a new bitmap using the <xref:System.Drawing.Image.FromFile%2A> method. It also demonstrates a <xref:System.Drawing.TextureBrush>.
This example is designed to be used with Windows Forms. Create a form containing a button named `Button2`. Paste the code into the form and associate the `Button2_Click` method with the button's <xref:System.Windows.Forms.Control.Click> event.
[!code-cpp[System.Drawing.ImageExample#2](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp#2)]
[!code-csharp[System.Drawing.ImageExample#2](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs#2)]
[!code-vb[System.Drawing.ImageExample#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.OutOfMemoryException">The file does not have a valid image format.
-or-
[!INCLUDE[ndptecgdiplus](~/includes/ndptecgdiplus-md.md)] does not support the pixel format of the file.</exception>
<exception cref="T:System.IO.FileNotFoundException">The specified file does not exist.</exception>
<exception cref="T:System.ArgumentException">
<paramref name="filename" /> is a <see cref="T:System.Uri" />.</exception>
<related type="Article" href="https://msdn.microsoft.com/library/6be085a2-2c13-47c8-b80a-c18b32777d8d">Types of Bitmaps</related>
</Docs>
</Member>
<MemberGroup MemberName="FromHbitmap">
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Creates a <see cref="T:System.Drawing.Bitmap" /> from a Windows handle.</summary>
</Docs>
</MemberGroup>
<Member MemberName="FromHbitmap">
<MemberSignature Language="C#" Value="public static System.Drawing.Bitmap FromHbitmap (IntPtr hbitmap);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Drawing.Bitmap FromHbitmap(native int hbitmap) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.FromHbitmap(System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromHbitmap (hbitmap As IntPtr) As Bitmap" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Drawing::Bitmap ^ FromHbitmap(IntPtr hbitmap);" />
<MemberSignature Language="F#" Value="static member FromHbitmap : nativeint -&gt; System.Drawing.Bitmap" Usage="System.Drawing.Image.FromHbitmap hbitmap" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Bitmap</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="hbitmap" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="hbitmap">The [!INCLUDE[ndptecgdi](~/includes/ndptecgdi-md.md)] bitmap handle from which to create the <see cref="T:System.Drawing.Bitmap" />.</param>
<summary>Creates a <see cref="T:System.Drawing.Bitmap" /> from a handle to a GDI bitmap.</summary>
<returns>The <see cref="T:System.Drawing.Bitmap" /> this method creates.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Drawing.Image.FromHbitmap%2A> method makes a copy of the [!INCLUDE[ndptecgdi](~/includes/ndptecgdi-md.md)] bitmap; so you can release the incoming [!INCLUDE[ndptecgdi](~/includes/ndptecgdi-md.md)] bitmap using the [!INCLUDE[ndptecgdi](~/includes/ndptecgdi-md.md)] `DeleteObject` method immediately after creating the new <xref:System.Drawing.Image>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="FromHbitmap">
<MemberSignature Language="C#" Value="public static System.Drawing.Bitmap FromHbitmap (IntPtr hbitmap, IntPtr hpalette);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Drawing.Bitmap FromHbitmap(native int hbitmap, native int hpalette) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.FromHbitmap(System.IntPtr,System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function FromHbitmap (hbitmap As IntPtr, hpalette As IntPtr) As Bitmap" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Drawing::Bitmap ^ FromHbitmap(IntPtr hbitmap, IntPtr hpalette);" />
<MemberSignature Language="F#" Value="static member FromHbitmap : nativeint * nativeint -&gt; System.Drawing.Bitmap" Usage="System.Drawing.Image.FromHbitmap (hbitmap, hpalette)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Bitmap</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="hbitmap" Type="System.IntPtr" />
<Parameter Name="hpalette" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="hbitmap">The [!INCLUDE[ndptecgdi](~/includes/ndptecgdi-md.md)] bitmap handle from which to create the <see cref="T:System.Drawing.Bitmap" />.</param>
<param name="hpalette">A handle to a [!INCLUDE[ndptecgdi](~/includes/ndptecgdi-md.md)] palette used to define the bitmap colors if the bitmap specified in the <paramref name="hbitmap" /> parameter is not a device-independent bitmap (DIB).</param>
<summary>Creates a <see cref="T:System.Drawing.Bitmap" /> from a handle to a GDI bitmap and a handle to a GDI palette.</summary>
<returns>The <see cref="T:System.Drawing.Bitmap" /> this method creates.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Drawing.Image.FromHbitmap%2A> method makes a copy of the [!INCLUDE[ndptecgdi](~/includes/ndptecgdi-md.md)] bitmap; so you can release the incoming [!INCLUDE[ndptecgdi](~/includes/ndptecgdi-md.md)] bitmap using the [!INCLUDE[ndptecgdi](~/includes/ndptecgdi-md.md)] `DeleteObject` method immediately after creating the new <xref:System.Drawing.Image>.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="FromStream">
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Creates an <see cref="T:System.Drawing.Image" /> from the specified data stream.</summary>
</Docs>
</MemberGroup>
<Member MemberName="FromStream">
<MemberSignature Language="C#" Value="public static System.Drawing.Image FromStream (System.IO.Stream stream);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Drawing.Image FromStream(class System.IO.Stream stream) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.FromStream(System.IO.Stream)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Drawing::Image ^ FromStream(System::IO::Stream ^ stream);" />
<MemberSignature Language="F#" Value="static member FromStream : System.IO.Stream -&gt; System.Drawing.Image" Usage="System.Drawing.Image.FromStream stream" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Image</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stream" Type="System.IO.Stream" />
</Parameters>
<Docs>
<param name="stream">A <see cref="T:System.IO.Stream" /> that contains the data for this <see cref="T:System.Drawing.Image" />.</param>
<summary>Creates an <see cref="T:System.Drawing.Image" /> from the specified data stream.</summary>
<returns>The <see cref="T:System.Drawing.Image" /> this method creates.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You must keep the stream open for the lifetime of the <xref:System.Drawing.Image>.
The stream is reset to zero if this method is called successively with the same stream.
> [!NOTE]
> The <xref:System.Drawing.Image> class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The stream does not have a valid image format
-or-
<paramref name="stream" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="FromStream">
<MemberSignature Language="C#" Value="public static System.Drawing.Image FromStream (System.IO.Stream stream, bool useEmbeddedColorManagement);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Drawing.Image FromStream(class System.IO.Stream stream, bool useEmbeddedColorManagement) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.FromStream(System.IO.Stream,System.Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Drawing::Image ^ FromStream(System::IO::Stream ^ stream, bool useEmbeddedColorManagement);" />
<MemberSignature Language="F#" Value="static member FromStream : System.IO.Stream * bool -&gt; System.Drawing.Image" Usage="System.Drawing.Image.FromStream (stream, useEmbeddedColorManagement)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Image</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stream" Type="System.IO.Stream" />
<Parameter Name="useEmbeddedColorManagement" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="stream">A <see cref="T:System.IO.Stream" /> that contains the data for this <see cref="T:System.Drawing.Image" />.</param>
<param name="useEmbeddedColorManagement">
<see langword="true" /> to use color management information embedded in the data stream; otherwise, <see langword="false" />.</param>
<summary>Creates an <see cref="T:System.Drawing.Image" /> from the specified data stream, optionally using embedded color management information in that stream.</summary>
<returns>The <see cref="T:System.Drawing.Image" /> this method creates.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You must keep the stream open for the lifetime of the <xref:System.Drawing.Image>.
The `useEmbeddedColorManagement` parameter specifies whether the new <xref:System.Drawing.Image> applies color correction according to color management information that is embedded in the data stream. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
The stream is reset to zero if this method is called successively with the same stream.
> [!NOTE]
> The <xref:System.Drawing.Image> class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The stream does not have a valid image format
-or-
<paramref name="stream" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="FromStream">
<MemberSignature Language="C#" Value="public static System.Drawing.Image FromStream (System.IO.Stream stream, bool useEmbeddedColorManagement, bool validateImageData);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Drawing.Image FromStream(class System.IO.Stream stream, bool useEmbeddedColorManagement, bool validateImageData) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.FromStream(System.IO.Stream,System.Boolean,System.Boolean)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static System::Drawing::Image ^ FromStream(System::IO::Stream ^ stream, bool useEmbeddedColorManagement, bool validateImageData);" />
<MemberSignature Language="F#" Value="static member FromStream : System.IO.Stream * bool * bool -&gt; System.Drawing.Image" Usage="System.Drawing.Image.FromStream (stream, useEmbeddedColorManagement, validateImageData)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Image</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stream" Type="System.IO.Stream" />
<Parameter Name="useEmbeddedColorManagement" Type="System.Boolean" />
<Parameter Name="validateImageData" Type="System.Boolean" />
</Parameters>
<Docs>
<param name="stream">A <see cref="T:System.IO.Stream" /> that contains the data for this <see cref="T:System.Drawing.Image" />.</param>
<param name="useEmbeddedColorManagement">
<see langword="true" /> to use color management information embedded in the data stream; otherwise, <see langword="false" />.</param>
<param name="validateImageData">
<see langword="true" /> to validate the image data; otherwise, <see langword="false" />.</param>
<summary>Creates an <see cref="T:System.Drawing.Image" /> from the specified data stream, optionally using embedded color management information and validating the image data.</summary>
<returns>The <see cref="T:System.Drawing.Image" /> this method creates.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `useEmbeddedColorManagement` parameter specifies whether the new <xref:System.Drawing.Image> applies color correction according to color management information that is embedded in the data stream. Embedded information can include International Color Consortium (ICC) profiles, gamma values, and chromaticity information.
> [!NOTE]
> The <xref:System.Drawing.Image> class does not support alpha transparency in bitmaps. To enable alpha transparency, use PNG images with 32 bits per pixel.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The stream does not have a valid image format.</exception>
</Docs>
</Member>
<Member MemberName="GetBounds">
<MemberSignature Language="C#" Value="public System.Drawing.RectangleF GetBounds (ref System.Drawing.GraphicsUnit pageUnit);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance valuetype System.Drawing.RectangleF GetBounds(valuetype System.Drawing.GraphicsUnit&amp; pageUnit) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.GetBounds(System.Drawing.GraphicsUnit@)" />
<MemberSignature Language="VB.NET" Value="Public Function GetBounds (ByRef pageUnit As GraphicsUnit) As RectangleF" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::RectangleF GetBounds(System::Drawing::GraphicsUnit % pageUnit);" />
<MemberSignature Language="F#" Value="member this.GetBounds : -&gt; System.Drawing.RectangleF" Usage="image.GetBounds pageUnit" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.RectangleF</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pageUnit" Type="System.Drawing.GraphicsUnit" RefType="ref" />
</Parameters>
<Docs>
<param name="pageUnit">One of the <see cref="T:System.Drawing.GraphicsUnit" /> values indicating the unit of measure for the bounding rectangle.</param>
<summary>Gets the bounds of the image in the specified unit.</summary>
<returns>The <see cref="T:System.Drawing.RectangleF" /> that represents the bounds of the image, in the specified unit.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to load a bitmap from an <xref:System.Drawing.Icon> handle, using the <xref:System.Drawing.GraphicsUnit> enumeration, and how to use the <xref:System.Drawing.Rectangle.Round%2A> method to draw the rectangle bounds of a bitmap.
This example is designed to be used with Windows Forms. Create a form that contains a button named `Button2`. Paste the code into the form and associate this method with the button's <xref:System.Windows.Forms.Control.Click> event.
[!code-cpp[System.Drawing.BitmapMembers#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CPP/form1.cpp#1)]
[!code-csharp[System.Drawing.BitmapMembers#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CS/form1.cs#1)]
[!code-vb[System.Drawing.BitmapMembers#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetEncoderParameterList">
<MemberSignature Language="C#" Value="public System.Drawing.Imaging.EncoderParameters GetEncoderParameterList (Guid encoder);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Drawing.Imaging.EncoderParameters GetEncoderParameterList(valuetype System.Guid encoder) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.GetEncoderParameterList(System.Guid)" />
<MemberSignature Language="VB.NET" Value="Public Function GetEncoderParameterList (encoder As Guid) As EncoderParameters" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Imaging::EncoderParameters ^ GetEncoderParameterList(Guid encoder);" />
<MemberSignature Language="F#" Value="member this.GetEncoderParameterList : Guid -&gt; System.Drawing.Imaging.EncoderParameters" Usage="image.GetEncoderParameterList encoder" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Imaging.EncoderParameters</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="encoder" Type="System.Guid" />
</Parameters>
<Docs>
<param name="encoder">A GUID that specifies the image encoder.</param>
<summary>Returns information about the parameters supported by the specified image encoder.</summary>
<returns>An <see cref="T:System.Drawing.Imaging.EncoderParameters" /> that contains an array of <see cref="T:System.Drawing.Imaging.EncoderParameter" /> objects. Each <see cref="T:System.Drawing.Imaging.EncoderParameter" /> contains information about one of the parameters supported by the specified image encoder.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetFrameCount">
<MemberSignature Language="C#" Value="public int GetFrameCount (System.Drawing.Imaging.FrameDimension dimension);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 GetFrameCount(class System.Drawing.Imaging.FrameDimension dimension) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.GetFrameCount(System.Drawing.Imaging.FrameDimension)" />
<MemberSignature Language="VB.NET" Value="Public Function GetFrameCount (dimension As FrameDimension) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int GetFrameCount(System::Drawing::Imaging::FrameDimension ^ dimension);" />
<MemberSignature Language="F#" Value="member this.GetFrameCount : System.Drawing.Imaging.FrameDimension -&gt; int" Usage="image.GetFrameCount dimension" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dimension" Type="System.Drawing.Imaging.FrameDimension" />
</Parameters>
<Docs>
<param name="dimension">A <see cref="T:System.Drawing.Imaging.FrameDimension" /> that specifies the identity of the dimension type.</param>
<summary>Returns the number of frames of the specified dimension.</summary>
<returns>The number of frames in the specified dimension.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method returns information about multiple-frame images, which come in two styles: multiple page and multiple resolution.
A multiple-page image is an image that contains more than one image. Each page contains a single image (or frame). These pages (or images, or frames) are typically displayed in succession to produce an animated sequence, such as an animated .gif file.
A multiple-resolution image is an image that contains more than one copy of an image at different resolutions. This is commonly used by MIP mapping where the displayed image size determines the resolution of the image used for drawing. [!INCLUDE[ndptecgdiplus](~/includes/ndptecgdiplus-md.md)] can support an arbitrary number of pages (or images, or frames), as well as an arbitrary number of resolutions. The defined dimensions are properties of the <xref:System.Drawing.Imaging.FrameDimension>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetPixelFormatSize">
<MemberSignature Language="C#" Value="public static int GetPixelFormatSize (System.Drawing.Imaging.PixelFormat pixfmt);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig int32 GetPixelFormatSize(valuetype System.Drawing.Imaging.PixelFormat pixfmt) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.GetPixelFormatSize(System.Drawing.Imaging.PixelFormat)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function GetPixelFormatSize (pixfmt As PixelFormat) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static int GetPixelFormatSize(System::Drawing::Imaging::PixelFormat pixfmt);" />
<MemberSignature Language="F#" Value="static member GetPixelFormatSize : System.Drawing.Imaging.PixelFormat -&gt; int" Usage="System.Drawing.Image.GetPixelFormatSize pixfmt" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pixfmt" Type="System.Drawing.Imaging.PixelFormat" />
</Parameters>
<Docs>
<param name="pixfmt">The <see cref="T:System.Drawing.Imaging.PixelFormat" /> member that specifies the format for which to find the size.</param>
<summary>Returns the color depth, in number of bits per pixel, of the specified pixel format.</summary>
<returns>The color depth of the specified pixel format.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetPropertyItem">
<MemberSignature Language="C#" Value="public System.Drawing.Imaging.PropertyItem GetPropertyItem (int propid);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Drawing.Imaging.PropertyItem GetPropertyItem(int32 propid) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.GetPropertyItem(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function GetPropertyItem (propid As Integer) As PropertyItem" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Imaging::PropertyItem ^ GetPropertyItem(int propid);" />
<MemberSignature Language="F#" Value="member this.GetPropertyItem : int -&gt; System.Drawing.Imaging.PropertyItem" Usage="image.GetPropertyItem propid" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Imaging.PropertyItem</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="propid" Type="System.Int32" />
</Parameters>
<Docs>
<param name="propid">The ID of the property item to get.</param>
<summary>Gets the specified property item from this <see cref="T:System.Drawing.Image" />.</summary>
<returns>The <see cref="T:System.Drawing.Imaging.PropertyItem" /> this method gets.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
For a list of property item IDs and links to more information, see <xref:System.Drawing.Imaging.PropertyItem.Id%2A>.
It is difficult to set property items, because the <xref:System.Drawing.Imaging.PropertyItem> class has no public constructors. One way to work around this restriction is to obtain a <xref:System.Drawing.Imaging.PropertyItem> by retrieving the <xref:System.Drawing.Image.PropertyItems%2A> property value or calling the <xref:System.Drawing.Image.GetPropertyItem%2A> method of an <xref:System.Drawing.Image> that already has property items. Then you can set the fields of the <xref:System.Drawing.Imaging.PropertyItem> and pass it to <xref:System.Drawing.Image.SetPropertyItem%2A>.
## Examples
The following code example demonstrates how to use the <xref:System.Drawing.Image.GetPropertyItem%2A> and <xref:System.Drawing.Image.SetPropertyItem%2A> methods. This example calls <xref:System.Drawing.Image.GetPropertyItem%2A> passing an ID value. For a list of ID values see, <xref:System.Drawing.Imaging.PropertyItem.Id%2A>. This example is designed to be used with Windows Forms. To run this example, paste it into a form, and handle the form's <xref:System.Windows.Forms.Control.Paint> event by calling the `DemonstratePropertyItem` method, passing `e` as <xref:System.Windows.Forms.PaintEventArgs>.
[!code-cpp[System.Drawing.ImageExample#7](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp#7)]
[!code-csharp[System.Drawing.ImageExample#7](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs#7)]
[!code-vb[System.Drawing.ImageExample#7](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb#7)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The image format of this image does not support property items.</exception>
</Docs>
</Member>
<Member MemberName="GetThumbnailImage">
<MemberSignature Language="C#" Value="public System.Drawing.Image GetThumbnailImage (int thumbWidth, int thumbHeight, System.Drawing.Image.GetThumbnailImageAbort callback, IntPtr callbackData);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.Drawing.Image GetThumbnailImage(int32 thumbWidth, int32 thumbHeight, class System.Drawing.Image/GetThumbnailImageAbort callback, native int callbackData) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.GetThumbnailImage(System.Int32,System.Int32,System.Drawing.Image.GetThumbnailImageAbort,System.IntPtr)" />
<MemberSignature Language="VB.NET" Value="Public Function GetThumbnailImage (thumbWidth As Integer, thumbHeight As Integer, callback As Image.GetThumbnailImageAbort, callbackData As IntPtr) As Image" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::Drawing::Image ^ GetThumbnailImage(int thumbWidth, int thumbHeight, System::Drawing::Image::GetThumbnailImageAbort ^ callback, IntPtr callbackData);" />
<MemberSignature Language="F#" Value="member this.GetThumbnailImage : int * int * System.Drawing.Image.GetThumbnailImageAbort * nativeint -&gt; System.Drawing.Image" Usage="image.GetThumbnailImage (thumbWidth, thumbHeight, callback, callbackData)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Image</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="thumbWidth" Type="System.Int32" />
<Parameter Name="thumbHeight" Type="System.Int32" />
<Parameter Name="callback" Type="System.Drawing.Image+GetThumbnailImageAbort" />
<Parameter Name="callbackData" Type="System.IntPtr" />
</Parameters>
<Docs>
<param name="thumbWidth">The width, in pixels, of the requested thumbnail image.</param>
<param name="thumbHeight">The height, in pixels, of the requested thumbnail image.</param>
<param name="callback">A <see cref="T:System.Drawing.Image.GetThumbnailImageAbort" /> delegate.
**Note** You must create a delegate and pass a reference to the delegate as the <paramref name="callback" /> parameter, but the delegate is not used.</param>
<param name="callbackData">Must be <see cref="F:System.IntPtr.Zero" />.</param>
<summary>Returns a thumbnail for this <see cref="T:System.Drawing.Image" />.</summary>
<returns>An <see cref="T:System.Drawing.Image" /> that represents the thumbnail.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the <xref:System.Drawing.Image> contains an embedded thumbnail image, this method retrieves the embedded thumbnail and scales it to the requested size. If the <xref:System.Drawing.Image> does not contain an embedded thumbnail image, this method creates a thumbnail image by scaling the main image.
The <xref:System.Drawing.Image.GetThumbnailImage%2A> method works well when the requested thumbnail image has a size of about 120 x 120 pixels. If you request a large thumbnail image (for example, 300 x 300) from an <xref:System.Drawing.Image> that has an embedded thumbnail, there could be a noticeable loss of quality in the thumbnail image. It might be better to scale the main image (instead of scaling the embedded thumbnail) by calling the <xref:System.Drawing.Graphics.DrawImage%2A> method.
## Examples
The following code example creates and displays a thumbnail image. This delegate is never called.
[!code-csharp[System.Drawing.Misc3#GetThumbnail](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.Misc3/CS/Form1.cs#getthumbnail)]
[!code-vb[System.Drawing.Misc3#GetThumbnail](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.Misc3/VB/Form1.vb#getthumbnail)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Height">
<MemberSignature Language="C#" Value="public int Height { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Height" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.Height" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Height As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Height { int get(); };" />
<MemberSignature Language="F#" Value="member this.Height : int" Usage="System.Drawing.Image.Height" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netcore-2.1;dotnet-plat-ext-2.1;netcore-2.2;dotnet-plat-ext-2.2;netcore-3.0">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the height, in pixels, of this <see cref="T:System.Drawing.Image" />.</summary>
<value>The height, in pixels, of this <see cref="T:System.Drawing.Image" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to construct a new bitmap from a file, using the <xref:System.Drawing.Bitmap.GetPixel%2A> and <xref:System.Drawing.Bitmap.SetPixel%2A> methods to recolor the image. It also uses the <xref:System.Drawing.Image.PixelFormat%2A> and <xref:System.Drawing.Image.Height%2A> properties.
This example is designed to be used with a Windows Forms that contains a <xref:System.Windows.Forms.Label>, <xref:System.Windows.Forms.PictureBox>, and <xref:System.Windows.Forms.Button> named `Label1`, `PictureBox1`, and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's <xref:System.Windows.Forms.Control.Click> event.
[!code-cpp[System.Drawing.ImageExample#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp#1)]
[!code-csharp[System.Drawing.ImageExample#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs#1)]
[!code-vb[System.Drawing.ImageExample#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="HorizontalResolution">
<MemberSignature Language="C#" Value="public float HorizontalResolution { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance float32 HorizontalResolution" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.HorizontalResolution" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property HorizontalResolution As Single" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property float HorizontalResolution { float get(); };" />
<MemberSignature Language="F#" Value="member this.HorizontalResolution : single" Usage="System.Drawing.Image.HorizontalResolution" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Single</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the horizontal resolution, in pixels per inch, of this <see cref="T:System.Drawing.Image" />.</summary>
<value>The horizontal resolution, in pixels per inch, of this <see cref="T:System.Drawing.Image" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsAlphaPixelFormat">
<MemberSignature Language="C#" Value="public static bool IsAlphaPixelFormat (System.Drawing.Imaging.PixelFormat pixfmt);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool IsAlphaPixelFormat(valuetype System.Drawing.Imaging.PixelFormat pixfmt) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.IsAlphaPixelFormat(System.Drawing.Imaging.PixelFormat)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function IsAlphaPixelFormat (pixfmt As PixelFormat) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool IsAlphaPixelFormat(System::Drawing::Imaging::PixelFormat pixfmt);" />
<MemberSignature Language="F#" Value="static member IsAlphaPixelFormat : System.Drawing.Imaging.PixelFormat -&gt; bool" Usage="System.Drawing.Image.IsAlphaPixelFormat pixfmt" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pixfmt" Type="System.Drawing.Imaging.PixelFormat" />
</Parameters>
<Docs>
<param name="pixfmt">The <see cref="T:System.Drawing.Imaging.PixelFormat" /> to test.</param>
<summary>Returns a value that indicates whether the pixel format for this <see cref="T:System.Drawing.Image" /> contains alpha information.</summary>
<returns>
<see langword="true" /> if <paramref name="pixfmt" /> contains alpha information; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsCanonicalPixelFormat">
<MemberSignature Language="C#" Value="public static bool IsCanonicalPixelFormat (System.Drawing.Imaging.PixelFormat pixfmt);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool IsCanonicalPixelFormat(valuetype System.Drawing.Imaging.PixelFormat pixfmt) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.IsCanonicalPixelFormat(System.Drawing.Imaging.PixelFormat)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function IsCanonicalPixelFormat (pixfmt As PixelFormat) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool IsCanonicalPixelFormat(System::Drawing::Imaging::PixelFormat pixfmt);" />
<MemberSignature Language="F#" Value="static member IsCanonicalPixelFormat : System.Drawing.Imaging.PixelFormat -&gt; bool" Usage="System.Drawing.Image.IsCanonicalPixelFormat pixfmt" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pixfmt" Type="System.Drawing.Imaging.PixelFormat" />
</Parameters>
<Docs>
<param name="pixfmt">The <see cref="T:System.Drawing.Imaging.PixelFormat" /> to test.</param>
<summary>Returns a value that indicates whether the pixel format is 32 bits per pixel.</summary>
<returns>
<see langword="true" /> if <paramref name="pixfmt" /> is canonical; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The canonical pixel format indicates a pixel format of 32 bits per pixel. This format specifies 24-bit color depth and an 8-bit alpha channel.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsExtendedPixelFormat">
<MemberSignature Language="C#" Value="public static bool IsExtendedPixelFormat (System.Drawing.Imaging.PixelFormat pixfmt);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig bool IsExtendedPixelFormat(valuetype System.Drawing.Imaging.PixelFormat pixfmt) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.IsExtendedPixelFormat(System.Drawing.Imaging.PixelFormat)" />
<MemberSignature Language="VB.NET" Value="Public Shared Function IsExtendedPixelFormat (pixfmt As PixelFormat) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static bool IsExtendedPixelFormat(System::Drawing::Imaging::PixelFormat pixfmt);" />
<MemberSignature Language="F#" Value="static member IsExtendedPixelFormat : System.Drawing.Imaging.PixelFormat -&gt; bool" Usage="System.Drawing.Image.IsExtendedPixelFormat pixfmt" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="pixfmt" Type="System.Drawing.Imaging.PixelFormat" />
</Parameters>
<Docs>
<param name="pixfmt">The <see cref="T:System.Drawing.Imaging.PixelFormat" /> enumeration to test.</param>
<summary>Returns a value that indicates whether the pixel format is 64 bits per pixel.</summary>
<returns>
<see langword="true" /> if <paramref name="pixfmt" /> is extended; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Palette">
<MemberSignature Language="C#" Value="public System.Drawing.Imaging.ColorPalette Palette { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Drawing.Imaging.ColorPalette Palette" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.Palette" />
<MemberSignature Language="VB.NET" Value="Public Property Palette As ColorPalette" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Imaging::ColorPalette ^ Palette { System::Drawing::Imaging::ColorPalette ^ get(); void set(System::Drawing::Imaging::ColorPalette ^ value); };" />
<MemberSignature Language="F#" Value="member this.Palette : System.Drawing.Imaging.ColorPalette with get, set" Usage="System.Drawing.Image.Palette" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Imaging.ColorPalette</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the color palette used for this <see cref="T:System.Drawing.Image" />.</summary>
<value>A <see cref="T:System.Drawing.Imaging.ColorPalette" /> that represents the color palette used for this <see cref="T:System.Drawing.Image" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property returns a copy of the <xref:System.Drawing.Imaging.ColorPalette> object used by this <xref:System.Drawing.Image>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="PhysicalDimension">
<MemberSignature Language="C#" Value="public System.Drawing.SizeF PhysicalDimension { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.SizeF PhysicalDimension" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.PhysicalDimension" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property PhysicalDimension As SizeF" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::SizeF PhysicalDimension { System::Drawing::SizeF get(); };" />
<MemberSignature Language="F#" Value="member this.PhysicalDimension : System.Drawing.SizeF" Usage="System.Drawing.Image.PhysicalDimension" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.SizeF</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the width and height of this image.</summary>
<value>A <see cref="T:System.Drawing.SizeF" /> structure that represents the width and height of this <see cref="T:System.Drawing.Image" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the image is a bitmap, the width and height are returned in pixels. If the image is a metafile, the width and height are returned in 0.01 millimeter units.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="PixelFormat">
<MemberSignature Language="C#" Value="public System.Drawing.Imaging.PixelFormat PixelFormat { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Imaging.PixelFormat PixelFormat" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.PixelFormat" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property PixelFormat As PixelFormat" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Imaging::PixelFormat PixelFormat { System::Drawing::Imaging::PixelFormat get(); };" />
<MemberSignature Language="F#" Value="member this.PixelFormat : System.Drawing.Imaging.PixelFormat" Usage="System.Drawing.Image.PixelFormat" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Imaging.PixelFormat</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the pixel format for this <see cref="T:System.Drawing.Image" />.</summary>
<value>A <see cref="T:System.Drawing.Imaging.PixelFormat" /> that represents the pixel format for this <see cref="T:System.Drawing.Image" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to construct a new bitmap from a file, using the <xref:System.Drawing.Bitmap.GetPixel%2A> and <xref:System.Drawing.Bitmap.SetPixel%2A> methods to recolor the image. It also uses the <xref:System.Drawing.Image.PixelFormat%2A> property.
This example is designed to be used with a Windows Form that contains a <xref:System.Windows.Forms.Label>, <xref:System.Windows.Forms.PictureBox> and <xref:System.Windows.Forms.Button> named `Label1`, `PictureBox1`, and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's <xref:System.Windows.Forms.Control.Click> event.
[!code-cpp[System.Drawing.ImageExample#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp#1)]
[!code-csharp[System.Drawing.ImageExample#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs#1)]
[!code-vb[System.Drawing.ImageExample#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="PropertyIdList">
<MemberSignature Language="C#" Value="public int[] PropertyIdList { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32[] PropertyIdList" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.PropertyIdList" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property PropertyIdList As Integer()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property cli::array &lt;int&gt; ^ PropertyIdList { cli::array &lt;int&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.PropertyIdList : int[]" Usage="System.Drawing.Image.PropertyIdList" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets IDs of the property items stored in this <see cref="T:System.Drawing.Image" />.</summary>
<value>An array of the property IDs, one for each property item stored in this image.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the image has no property items or if the image format does not support property items, the <xref:System.Drawing.Image.PropertyIdList%2A> property returns an empty array (that is, an array of length zero).
]]></format>
</remarks>
<related type="Article" href="https://msdn.microsoft.com/library/72ec0b31-0be7-444a-9575-1dbcb864e0be">How To: Read Image Metadata</related>
</Docs>
</Member>
<Member MemberName="PropertyItems">
<MemberSignature Language="C#" Value="public System.Drawing.Imaging.PropertyItem[] PropertyItems { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Drawing.Imaging.PropertyItem[] PropertyItems" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.PropertyItems" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property PropertyItems As PropertyItem()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property cli::array &lt;System::Drawing::Imaging::PropertyItem ^&gt; ^ PropertyItems { cli::array &lt;System::Drawing::Imaging::PropertyItem ^&gt; ^ get(); };" />
<MemberSignature Language="F#" Value="member this.PropertyItems : System.Drawing.Imaging.PropertyItem[]" Usage="System.Drawing.Image.PropertyItems" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Imaging.PropertyItem[]</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets all the property items (pieces of metadata) stored in this <see cref="T:System.Drawing.Image" />.</summary>
<value>An array of <see cref="T:System.Drawing.Imaging.PropertyItem" /> objects, one for each property item stored in the image.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the image has no property items or if the image format does not support property items, <xref:System.Drawing.Image.PropertyItems%2A> returns an empty array (that is, an array of length zero).
## Examples
The following code example demonstrates how to read and display the metadata in an image file using the <xref:System.Drawing.Imaging.PropertyItem?displayProperty=nameWithType> class and the <xref:System.Drawing.Image.PropertyItems%2A> property.
This example is designed to be used a Windows Form that imports the <xref:System.Drawing.Imaging?displayProperty=nameWithType> namespace. Paste the code into the form and change the path to `fakePhoto.jpg` to point to an image file on your system. Call the `ExtractMetaData` method when handling the form's <xref:System.Windows.Forms.Control.Paint> event, passing `e` as <xref:System.Windows.Forms.PaintEventArgs>.
[!code-cpp[System.Drawing.ImageExample#6](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp#6)]
[!code-csharp[System.Drawing.ImageExample#6](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs#6)]
[!code-vb[System.Drawing.ImageExample#6](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb#6)]
]]></format>
</remarks>
<related type="Article" href="https://msdn.microsoft.com/library/72ec0b31-0be7-444a-9575-1dbcb864e0be">How To: Read Image Metadata</related>
</Docs>
</Member>
<Member MemberName="RawFormat">
<MemberSignature Language="C#" Value="public System.Drawing.Imaging.ImageFormat RawFormat { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Drawing.Imaging.ImageFormat RawFormat" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.RawFormat" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property RawFormat As ImageFormat" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Imaging::ImageFormat ^ RawFormat { System::Drawing::Imaging::ImageFormat ^ get(); };" />
<MemberSignature Language="F#" Value="member this.RawFormat : System.Drawing.Imaging.ImageFormat" Usage="System.Drawing.Image.RawFormat" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Drawing.Imaging.ImageFormat</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the file format of this <see cref="T:System.Drawing.Image" />.</summary>
<value>The <see cref="T:System.Drawing.Imaging.ImageFormat" /> that represents the file format of this <see cref="T:System.Drawing.Image" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="RemovePropertyItem">
<MemberSignature Language="C#" Value="public void RemovePropertyItem (int propid);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RemovePropertyItem(int32 propid) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.RemovePropertyItem(System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Sub RemovePropertyItem (propid As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void RemovePropertyItem(int propid);" />
<MemberSignature Language="F#" Value="member this.RemovePropertyItem : int -&gt; unit" Usage="image.RemovePropertyItem propid" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="propid" Type="System.Int32" />
</Parameters>
<Docs>
<param name="propid">The ID of the property item to remove.</param>
<summary>Removes the specified property item from this <see cref="T:System.Drawing.Image" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
It is difficult to set property items, because the <xref:System.Drawing.Imaging.PropertyItem> class has no public constructors. One way to work around this restriction is to obtain a <xref:System.Drawing.Imaging.PropertyItem> by retrieving the <xref:System.Drawing.Image.PropertyItems%2A> property value or calling the <xref:System.Drawing.Image.GetPropertyItem%2A> method of an <xref:System.Drawing.Image> that already has property items. Then you can set the fields of the <xref:System.Drawing.Imaging.PropertyItem> and pass it to <xref:System.Drawing.Image.SetPropertyItem%2A>.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The image does not contain the requested property item.
-or-
The image format for this image does not support property items.</exception>
</Docs>
</Member>
<Member MemberName="RotateFlip">
<MemberSignature Language="C#" Value="public void RotateFlip (System.Drawing.RotateFlipType rotateFlipType);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void RotateFlip(valuetype System.Drawing.RotateFlipType rotateFlipType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.RotateFlip(System.Drawing.RotateFlipType)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void RotateFlip(System::Drawing::RotateFlipType rotateFlipType);" />
<MemberSignature Language="F#" Value="member this.RotateFlip : System.Drawing.RotateFlipType -&gt; unit" Usage="image.RotateFlip rotateFlipType" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="rotateFlipType" Type="System.Drawing.RotateFlipType" />
</Parameters>
<Docs>
<param name="rotateFlipType">A <see cref="T:System.Drawing.RotateFlipType" /> member that specifies the type of rotation and flip to apply to the image.</param>
<summary>Rotates, flips, or rotates and flips the <see cref="T:System.Drawing.Image" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Drawing.Image.RotateFlip%2A> method rotates the image clockwise.
If you wish to draw on an image once it has been rotated, you should always retrieve a new graphics object from the image, otherwise an exception could occur.
## Examples
The following code example demonstrates how to call the <xref:System.Drawing.Image.RotateFlip%2A> method on an <xref:System.Drawing.Image> and the <xref:System.Drawing.RotateFlipType> enumeration.
This example is designed to be used with a Windows Form that contains a <xref:System.Windows.Forms.PictureBox> named `PictureBox1` and a button named `Button1`. Paste the code into a form, call `InitializeBitmap` from the form's constructor, and associate `Button1_Click` with the button's <xref:System.Windows.Forms.Control.Click> event. Ensure the file path to the bitmap is valid on your system.
[!code-cpp[System.Drawing.BitmapMembers#3](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CPP/form1.cpp#3)]
[!code-csharp[System.Drawing.BitmapMembers#3](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BitmapMembers/CS/form1.cs#3)]
[!code-vb[System.Drawing.BitmapMembers#3](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BitmapMembers/VB/form1.vb#3)]
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="Save">
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Saves this image to the specified stream in the specified format.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Save">
<MemberSignature Language="C#" Value="public void Save (string filename);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Save(string filename) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.Save(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub Save (filename As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Save(System::String ^ filename);" />
<MemberSignature Language="F#" Value="member this.Save : string -&gt; unit" Usage="image.Save filename" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
</Parameters>
<Docs>
<param name="filename">A string that contains the name of the file to which to save this <see cref="T:System.Drawing.Image" />.</param>
<summary>Saves this <see cref="T:System.Drawing.Image" /> to the specified file or stream.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If no encoder exists for the file format of the image, the Portable Network Graphics (PNG) encoder is used. When you use the <xref:System.Drawing.Image.Save%2A> method to save a graphic image as a Windows Metafile Format (WMF) or Enhanced Metafile Format (EMF) file, the resulting file is saved as a Portable Network Graphics (PNG) file. This behavior occurs because the [!INCLUDE[ndptecgdiplus](~/includes/ndptecgdiplus-md.md)] component of the [!INCLUDE[dnprdnshort](~/includes/dnprdnshort-md.md)] does not have an encoder that you can use to save files as .wmf or .emf files.
Saving the image to the same file it was constructed from is not allowed and throws an exception.
## Examples
The following code example demonstrates how to call the <xref:System.Drawing.Image.Save%2A> method. This example is designed to be used with Windows Forms. Create a form that contains a button named `Button5`. Paste the code into the form, and associate the method with the button's <xref:System.Windows.Forms.Control.Click> event.
[!code-cpp[System.Drawing.ImageExample#5](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp#5)]
[!code-csharp[System.Drawing.ImageExample#5](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs#5)]
[!code-vb[System.Drawing.ImageExample#5](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb#5)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="filename" /> is <see langword="null." /></exception>
<exception cref="T:System.Runtime.InteropServices.ExternalException">The image was saved with the wrong image format.
-or-
The image was saved to the same file it was created from.</exception>
</Docs>
</Member>
<Member MemberName="Save">
<MemberSignature Language="C#" Value="public void Save (System.IO.Stream stream, System.Drawing.Imaging.ImageFormat format);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Save(class System.IO.Stream stream, class System.Drawing.Imaging.ImageFormat format) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.Save(System.IO.Stream,System.Drawing.Imaging.ImageFormat)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Save(System::IO::Stream ^ stream, System::Drawing::Imaging::ImageFormat ^ format);" />
<MemberSignature Language="F#" Value="member this.Save : System.IO.Stream * System.Drawing.Imaging.ImageFormat -&gt; unit" Usage="image.Save (stream, format)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stream" Type="System.IO.Stream" />
<Parameter Name="format" Type="System.Drawing.Imaging.ImageFormat" />
</Parameters>
<Docs>
<param name="stream">The <see cref="T:System.IO.Stream" /> where the image will be saved.</param>
<param name="format">An <see cref="T:System.Drawing.Imaging.ImageFormat" /> that specifies the format of the saved image.</param>
<summary>Saves this image to the specified stream in the specified format.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You should avoid saving an image to the same stream that was used to construct it. Doing so might damage the stream.
The image must be saved to the stream at an offset of zero. If any additional data has been written to the stream before saving the image, the image data in the stream will be corrupted.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="stream" /> or <paramref name="format" /> is <see langword="null" />.</exception>
<exception cref="T:System.Runtime.InteropServices.ExternalException">The image was saved with the wrong image format</exception>
</Docs>
</Member>
<Member MemberName="Save">
<MemberSignature Language="C#" Value="public void Save (string filename, System.Drawing.Imaging.ImageFormat format);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Save(string filename, class System.Drawing.Imaging.ImageFormat format) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.Save(System.String,System.Drawing.Imaging.ImageFormat)" />
<MemberSignature Language="VB.NET" Value="Public Sub Save (filename As String, format As ImageFormat)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Save(System::String ^ filename, System::Drawing::Imaging::ImageFormat ^ format);" />
<MemberSignature Language="F#" Value="member this.Save : string * System.Drawing.Imaging.ImageFormat -&gt; unit" Usage="image.Save (filename, format)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
<Parameter Name="format" Type="System.Drawing.Imaging.ImageFormat" />
</Parameters>
<Docs>
<param name="filename">A string that contains the name of the file to which to save this <see cref="T:System.Drawing.Image" />.</param>
<param name="format">The <see cref="T:System.Drawing.Imaging.ImageFormat" /> for this <see cref="T:System.Drawing.Image" />.</param>
<summary>Saves this <see cref="T:System.Drawing.Image" /> to the specified file in the specified format.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to construct a bitmap from a type, and how to use the <xref:System.Drawing.Image.Save%2A> method. To run this example, paste the code into a Windows Form. Handle the form's <xref:System.Windows.Forms.Control.Paint> event, and call the `ConstructFromResourceSaveAsGif` method, passing `e` as <xref:System.Windows.Forms.PaintEventArgs>
[!code-cpp[System.Drawing.BmpCtorAndSave#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/cpp/form1.cpp#1)]
[!code-csharp[System.Drawing.BmpCtorAndSave#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/CS/form1.cs#1)]
[!code-vb[System.Drawing.BmpCtorAndSave#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.BmpCtorAndSave/VB/form1.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="filename" /> or <paramref name="format" /> is <see langword="null." /></exception>
<exception cref="T:System.Runtime.InteropServices.ExternalException">The image was saved with the wrong image format.
-or-
The image was saved to the same file it was created from.</exception>
</Docs>
</Member>
<Member MemberName="Save">
<MemberSignature Language="C#" Value="public void Save (System.IO.Stream stream, System.Drawing.Imaging.ImageCodecInfo encoder, System.Drawing.Imaging.EncoderParameters encoderParams);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Save(class System.IO.Stream stream, class System.Drawing.Imaging.ImageCodecInfo encoder, class System.Drawing.Imaging.EncoderParameters encoderParams) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.Save(System.IO.Stream,System.Drawing.Imaging.ImageCodecInfo,System.Drawing.Imaging.EncoderParameters)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Save(System::IO::Stream ^ stream, System::Drawing::Imaging::ImageCodecInfo ^ encoder, System::Drawing::Imaging::EncoderParameters ^ encoderParams);" />
<MemberSignature Language="F#" Value="member this.Save : System.IO.Stream * System.Drawing.Imaging.ImageCodecInfo * System.Drawing.Imaging.EncoderParameters -&gt; unit" Usage="image.Save (stream, encoder, encoderParams)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="stream" Type="System.IO.Stream" />
<Parameter Name="encoder" Type="System.Drawing.Imaging.ImageCodecInfo" />
<Parameter Name="encoderParams" Type="System.Drawing.Imaging.EncoderParameters" />
</Parameters>
<Docs>
<param name="stream">The <see cref="T:System.IO.Stream" /> where the image will be saved.</param>
<param name="encoder">The <see cref="T:System.Drawing.Imaging.ImageCodecInfo" /> for this <see cref="T:System.Drawing.Image" />.</param>
<param name="encoderParams">An <see cref="T:System.Drawing.Imaging.EncoderParameters" /> that specifies parameters used by the image encoder.</param>
<summary>Saves this image to the specified stream, with the specified encoder and image encoder parameters.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Do not save an image to the same stream that was used to construct the image. Doing so might damage the stream.
The image must be saved to the stream at an offset of zero. If any additional data has been written to the stream before saving the image, the image data in the stream will be corrupted.
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="stream" /> is <see langword="null" />.</exception>
<exception cref="T:System.Runtime.InteropServices.ExternalException">The image was saved with the wrong image format.</exception>
</Docs>
</Member>
<Member MemberName="Save">
<MemberSignature Language="C#" Value="public void Save (string filename, System.Drawing.Imaging.ImageCodecInfo encoder, System.Drawing.Imaging.EncoderParameters encoderParams);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Save(string filename, class System.Drawing.Imaging.ImageCodecInfo encoder, class System.Drawing.Imaging.EncoderParameters encoderParams) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.Save(System.String,System.Drawing.Imaging.ImageCodecInfo,System.Drawing.Imaging.EncoderParameters)" />
<MemberSignature Language="VB.NET" Value="Public Sub Save (filename As String, encoder As ImageCodecInfo, encoderParams As EncoderParameters)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void Save(System::String ^ filename, System::Drawing::Imaging::ImageCodecInfo ^ encoder, System::Drawing::Imaging::EncoderParameters ^ encoderParams);" />
<MemberSignature Language="F#" Value="member this.Save : string * System.Drawing.Imaging.ImageCodecInfo * System.Drawing.Imaging.EncoderParameters -&gt; unit" Usage="image.Save (filename, encoder, encoderParams)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
<Parameter Name="encoder" Type="System.Drawing.Imaging.ImageCodecInfo" />
<Parameter Name="encoderParams" Type="System.Drawing.Imaging.EncoderParameters" />
</Parameters>
<Docs>
<param name="filename">A string that contains the name of the file to which to save this <see cref="T:System.Drawing.Image" />.</param>
<param name="encoder">The <see cref="T:System.Drawing.Imaging.ImageCodecInfo" /> for this <see cref="T:System.Drawing.Image" />.</param>
<param name="encoderParams">An <see cref="T:System.Drawing.Imaging.EncoderParameters" /> to use for this <see cref="T:System.Drawing.Image" />.</param>
<summary>Saves this <see cref="T:System.Drawing.Image" /> to the specified file, with the specified encoder and image-encoder parameters.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Saving the image to the same file it was constructed from is not allowed and throws an exception.
## Examples
The following example creates a <xref:System.Drawing.Bitmap> object from a BMP file. The code saves the bitmap to three JPEG files, each with a different quality level.
[!code-cpp[System.Drawing.ClassicImagingEndcoder3#3](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ClassicImagingEndcoder3/CPP/form1.cpp#3)]
[!code-csharp[System.Drawing.ClassicImagingEndcoder3#3](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ClassicImagingEndcoder3/CS/form1.cs#3)]
[!code-vb[System.Drawing.ClassicImagingEndcoder3#3](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ClassicImagingEndcoder3/VB/form1.vb#3)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="filename" /> or <paramref name="encoder" /> is <see langword="null." /></exception>
<exception cref="T:System.Runtime.InteropServices.ExternalException">The image was saved with the wrong image format.
-or-
The image was saved to the same file it was created from.</exception>
<related type="Article" href="https://msdn.microsoft.com/library/4b9a74e3-9504-43c1-9f28-ace651d0772e">How to: Set JPEG Compression Level</related>
</Docs>
</Member>
<MemberGroup MemberName="SaveAdd">
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Adds the information in the specified <see cref="T:System.Drawing.Image" /> to this <see cref="T:System.Drawing.Image" />. The specified <see cref="T:System.Drawing.Imaging.EncoderParameters" /> determine how the new information is incorporated into the existing image.</summary>
</Docs>
</MemberGroup>
<Member MemberName="SaveAdd">
<MemberSignature Language="C#" Value="public void SaveAdd (System.Drawing.Imaging.EncoderParameters encoderParams);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SaveAdd(class System.Drawing.Imaging.EncoderParameters encoderParams) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.SaveAdd(System.Drawing.Imaging.EncoderParameters)" />
<MemberSignature Language="VB.NET" Value="Public Sub SaveAdd (encoderParams As EncoderParameters)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void SaveAdd(System::Drawing::Imaging::EncoderParameters ^ encoderParams);" />
<MemberSignature Language="F#" Value="member this.SaveAdd : System.Drawing.Imaging.EncoderParameters -&gt; unit" Usage="image.SaveAdd encoderParams" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="encoderParams" Type="System.Drawing.Imaging.EncoderParameters" />
</Parameters>
<Docs>
<param name="encoderParams">An <see cref="T:System.Drawing.Imaging.EncoderParameters" /> that holds parameters required by the image encoder that is used by the save-add operation.</param>
<summary>Adds a frame to the file or stream specified in a previous call to the <see cref="Overload:System.Drawing.Image.Save" /> method. Use this method to save selected frames from a multiple-frame image to another multiple-frame image.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="SaveAdd">
<MemberSignature Language="C#" Value="public void SaveAdd (System.Drawing.Image image, System.Drawing.Imaging.EncoderParameters encoderParams);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SaveAdd(class System.Drawing.Image image, class System.Drawing.Imaging.EncoderParameters encoderParams) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.SaveAdd(System.Drawing.Image,System.Drawing.Imaging.EncoderParameters)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void SaveAdd(System::Drawing::Image ^ image, System::Drawing::Imaging::EncoderParameters ^ encoderParams);" />
<MemberSignature Language="F#" Value="member this.SaveAdd : System.Drawing.Image * System.Drawing.Imaging.EncoderParameters -&gt; unit" Usage="image.SaveAdd (image, encoderParams)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="image" Type="System.Drawing.Image" />
<Parameter Name="encoderParams" Type="System.Drawing.Imaging.EncoderParameters" />
</Parameters>
<Docs>
<param name="image">An <see cref="T:System.Drawing.Image" /> that contains the frame to add.</param>
<param name="encoderParams">An <see cref="T:System.Drawing.Imaging.EncoderParameters" /> that holds parameters required by the image encoder that is used by the save-add operation.</param>
<summary>Adds a frame to the file or stream specified in a previous call to the <see cref="Overload:System.Drawing.Image.Save" /> method.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="image" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="SelectActiveFrame">
<MemberSignature Language="C#" Value="public int SelectActiveFrame (System.Drawing.Imaging.FrameDimension dimension, int frameIndex);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance int32 SelectActiveFrame(class System.Drawing.Imaging.FrameDimension dimension, int32 frameIndex) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.SelectActiveFrame(System.Drawing.Imaging.FrameDimension,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Function SelectActiveFrame (dimension As FrameDimension, frameIndex As Integer) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; int SelectActiveFrame(System::Drawing::Imaging::FrameDimension ^ dimension, int frameIndex);" />
<MemberSignature Language="F#" Value="member this.SelectActiveFrame : System.Drawing.Imaging.FrameDimension * int -&gt; int" Usage="image.SelectActiveFrame (dimension, frameIndex)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="dimension" Type="System.Drawing.Imaging.FrameDimension" />
<Parameter Name="frameIndex" Type="System.Int32" />
</Parameters>
<Docs>
<param name="dimension">A <see cref="T:System.Drawing.Imaging.FrameDimension" /> that specifies the identity of the dimension type.</param>
<param name="frameIndex">The index of the active frame.</param>
<summary>Selects the frame specified by the dimension and index.</summary>
<returns>Always returns 0.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The possible values of the `dimensionID` parameter are properties of the <xref:System.Drawing.Imaging.FrameDimension>. These can be used to identify an image by its time, resolution, or page number.
Calling this method causes all changes made to the previous frame to be discarded. Before selecting another frame, save all changes made to the current frame, including changes to pixel values and properties. If the call to the <xref:System.Drawing.Image.SelectActiveFrame%2A> method is successful (an exception does not occur), the method will return 0.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SetPropertyItem">
<MemberSignature Language="C#" Value="public void SetPropertyItem (System.Drawing.Imaging.PropertyItem propitem);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetPropertyItem(class System.Drawing.Imaging.PropertyItem propitem) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.SetPropertyItem(System.Drawing.Imaging.PropertyItem)" />
<MemberSignature Language="VB.NET" Value="Public Sub SetPropertyItem (propitem As PropertyItem)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; void SetPropertyItem(System::Drawing::Imaging::PropertyItem ^ propitem);" />
<MemberSignature Language="F#" Value="member this.SetPropertyItem : System.Drawing.Imaging.PropertyItem -&gt; unit" Usage="image.SetPropertyItem propitem" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="propitem" Type="System.Drawing.Imaging.PropertyItem" />
</Parameters>
<Docs>
<param name="propitem">The <see cref="T:System.Drawing.Imaging.PropertyItem" /> to be stored.</param>
<summary>Stores a property item (piece of metadata) in this <see cref="T:System.Drawing.Image" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If the image format does not support property items, this method throws <xref:System.ArgumentException> with the message "Property not supported." If the image format supports property items but does not support the particular property you are attempting to set, this method ignores the attempt but does not throw an exception.
It is difficult to set property items, because the <xref:System.Drawing.Imaging.PropertyItem> class has no public constructors. One way to work around this restriction is to obtain a <xref:System.Drawing.Imaging.PropertyItem> by retrieving the <xref:System.Drawing.Image.PropertyItems%2A> property value or calling the <xref:System.Drawing.Image.GetPropertyItem%2A> method of an <xref:System.Drawing.Image> that already has property items. Then you can set the fields of the <xref:System.Drawing.Imaging.PropertyItem> and pass it to <xref:System.Drawing.Image.SetPropertyItem%2A>.
## Examples
The following code example demonstrates how to use the <xref:System.Drawing.Image.GetPropertyItem%2A> and <xref:System.Drawing.Image.SetPropertyItem%2A> methods. This example is designed to be used with Windows Forms. To run this example, paste it into a form, and handle the form's <xref:System.Windows.Forms.Control.Paint> event by calling the `DemonstratePropertyItem` method, passing `e` as <xref:System.Windows.Forms.PaintEventArgs>.
[!code-cpp[System.Drawing.ImageExample#7](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp#7)]
[!code-csharp[System.Drawing.ImageExample#7](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs#7)]
[!code-vb[System.Drawing.ImageExample#7](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb#7)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">The image format of this image does not support property items.</exception>
</Docs>
</Member>
<Member MemberName="Size">
<MemberSignature Language="C#" Value="public System.Drawing.Size Size { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Drawing.Size Size" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.Size" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Size As Size" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Drawing::Size Size { System::Drawing::Size get(); };" />
<MemberSignature Language="F#" Value="member this.Size : System.Drawing.Size" Usage="System.Drawing.Image.Size" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Drawing.Size</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the width and height, in pixels, of this image.</summary>
<value>A <see cref="T:System.Drawing.Size" /> structure that represents the width and height, in pixels, of this image.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="System.Runtime.Serialization.ISerializable.GetObjectData">
<MemberSignature Language="C#" Value="void ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" FrameworkAlternate="netcore-2.1;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Runtime.Serialization.ISerializable.GetObjectData(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" FrameworkAlternate="netcore-2.1;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.System#Runtime#Serialization#ISerializable#GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" FrameworkAlternate="netframework-1.1;netframework-2.0;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" />
<MemberSignature Language="VB.NET" Value="Sub GetObjectData (info As SerializationInfo, context As StreamingContext) Implements ISerializable.GetObjectData" FrameworkAlternate="netcore-2.1;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Runtime.Serialization.ISerializable.GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context) = System::Runtime::Serialization::ISerializable::GetObjectData;" FrameworkAlternate="netcore-2.1;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0" />
<MemberSignature Language="C#" Value="void ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo si, System.Runtime.Serialization.StreamingContext context);" FrameworkAlternate="netframework-1.1;netframework-2.0;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" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Runtime.Serialization.ISerializable.GetObjectData(class System.Runtime.Serialization.SerializationInfo si, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" FrameworkAlternate="netframework-1.1;netframework-2.0;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" />
<MemberSignature Language="VB.NET" Value="Sub GetObjectData (si As SerializationInfo, context As StreamingContext) Implements ISerializable.GetObjectData" FrameworkAlternate="netframework-1.1;netframework-2.0;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" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Runtime.Serialization.ISerializable.GetObjectData(System::Runtime::Serialization::SerializationInfo ^ si, System::Runtime::Serialization::StreamingContext context) = System::Runtime::Serialization::ISerializable::GetObjectData;" FrameworkAlternate="netframework-1.1;netframework-2.0;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" />
<MemberSignature Language="DocId" Value="M:System.Drawing.Image.System#Runtime#Serialization#ISerializable#GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" FrameworkAlternate="netframework-1.1" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" Index="0" FrameworkAlternate="dotnet-plat-ext-2.1;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0;netcore-2.1;netcore-2.2;netcore-3.0" />
<Parameter Name="si" Type="System.Runtime.Serialization.SerializationInfo" Index="0" FrameworkAlternate="netframework-1.1;netframework-2.0;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" />
<Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" Index="1" />
</Parameters>
<Docs>
<param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object to populate with data.</param>
<param name="si">To be added.</param>
<param name="context">The destination (see <see cref="T:System.Runtime.Serialization.StreamingContext" />) for this serialization.</param>
<summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Tag">
<MemberSignature Language="C#" Value="public object Tag { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Tag" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.Tag" />
<MemberSignature Language="VB.NET" Value="Public Property Tag As Object" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::Object ^ Tag { System::Object ^ get(); void set(System::Object ^ value); };" />
<MemberSignature Language="F#" Value="member this.Tag : obj with get, set" Usage="System.Drawing.Image.Tag" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-2.0;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">
<AttributeName>System.ComponentModel.Bindable(true)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.DefaultValue(null)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.Localizable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;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">
<AttributeName>System.ComponentModel.TypeConverter(typeof(System.ComponentModel.StringConverter))</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets an object that provides additional data about the image.</summary>
<value>The <see cref="T:System.Object" /> that provides additional data about the image.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="VerticalResolution">
<MemberSignature Language="C#" Value="public float VerticalResolution { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance float32 VerticalResolution" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.VerticalResolution" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property VerticalResolution As Single" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property float VerticalResolution { float get(); };" />
<MemberSignature Language="F#" Value="member this.VerticalResolution : single" Usage="System.Drawing.Image.VerticalResolution" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Single</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the vertical resolution, in pixels per inch, of this <see cref="T:System.Drawing.Image" />.</summary>
<value>The vertical resolution, in pixels per inch, of this <see cref="T:System.Drawing.Image" />.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Width">
<MemberSignature Language="C#" Value="public int Width { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Width" />
<MemberSignature Language="DocId" Value="P:System.Drawing.Image.Width" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Width As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property int Width { int get(); };" />
<MemberSignature Language="F#" Value="member this.Width : int" Usage="System.Drawing.Image.Width" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Drawing</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Drawing.Common</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.1</AssemblyVersion>
<AssemblyVersion>4.0.1.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.Browsable(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;netcore-2.1;netframework-4.8;dotnet-plat-ext-2.1;netcore-2.2;netcore-3.0;dotnet-plat-ext-2.2;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.DefaultValue(false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netcore-2.1;dotnet-plat-ext-2.1;netcore-2.2;dotnet-plat-ext-2.2;netcore-3.0">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;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;dotnet-plat-ext-3.0">
<AttributeName>System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the width, in pixels, of this <see cref="T:System.Drawing.Image" />.</summary>
<value>The width, in pixels, of this <see cref="T:System.Drawing.Image" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Examples
The following code example demonstrates how to construct a new <xref:System.Drawing.Bitmap> from a file, using the <xref:System.Drawing.Bitmap.GetPixel%2A> and <xref:System.Drawing.Bitmap.SetPixel%2A> methods to recolor the image. It also uses the <xref:System.Drawing.Image.PixelFormat%2A>, <xref:System.Drawing.Image.Width%2A>, and <xref:System.Drawing.Image.Height%2A> properties.
This example is designed to be used with a Windows Forms that contains a <xref:System.Windows.Forms.Label> ,<xref:System.Windows.Forms.PictureBox> and <xref:System.Windows.Forms.Button> named `Label1`, `PictureBox1` and `Button1`, respectively. Paste the code into the form and associate the `Button1_Click` method with the button's <xref:System.Windows.Forms.Control.Click> event.
[!code-cpp[System.Drawing.ImageExample#1](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Drawing.ImageExample/CPP/form1.cpp#1)]
[!code-csharp[System.Drawing.ImageExample#1](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Drawing.ImageExample/CS/form1.cs#1)]
[!code-vb[System.Drawing.ImageExample#1](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Drawing.ImageExample/VB/form1.vb#1)]
]]></format>
</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.