Image Class
Assembly: System.Drawing (in System.Drawing.dll)
System.MarshalByRefObject
System.Drawing.Image
System.Drawing.Bitmap
System.Drawing.Imaging.Metafile
| Name | Description | |
|---|---|---|
![]() | Flags | Gets attribute flags for the pixel data of this Image. |
![]() | FrameDimensionsList | Gets an array of GUIDs that represent the dimensions of frames within this Image. |
![]() | Height | Gets the height, in pixels, of this Image. |
![]() | HorizontalResolution | Gets the horizontal resolution, in pixels per inch, of this Image. |
![]() | Palette | Gets or sets the color palette used for this Image. |
![]() | PhysicalDimension | Gets the width and height of this image. |
![]() | PixelFormat | Gets the pixel format for this Image. |
![]() | PropertyIdList | Gets IDs of the property items stored in this Image. |
![]() | PropertyItems | Gets all the property items (pieces of metadata) stored in this Image. |
![]() | RawFormat | Gets the file format of this Image. |
![]() | Size | Gets the width and height, in pixels, of this image. |
![]() | Tag | Gets or sets an object that provides additional data about the image. |
![]() | VerticalResolution | Gets the vertical resolution, in pixels per inch, of this Image. |
![]() | Width | Gets the width, in pixels, of this Image. |
| Name | Description | |
|---|---|---|
![]() | Clone() | Creates an exact copy of this Image. |
![]() | CreateObjRef(Type) | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.) |
![]() | Dispose() | Releases all resources used by this Image. |
![]() | Dispose(Boolean) | Releases the unmanaged resources used by the Image and optionally releases the managed resources. |
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Overrides Object.Finalize().) |
![]() ![]() | FromFile(String) | Creates an Image from the specified file. |
![]() ![]() | FromFile(String, Boolean) | Creates an Image from the specified file using embedded color management information in that file. |
![]() ![]() | FromHbitmap(IntPtr) | Creates a Bitmap from a handle to a GDI bitmap. |
![]() ![]() | FromHbitmap(IntPtr, IntPtr) | Creates a Bitmap from a handle to a GDI bitmap and a handle to a GDI palette. |
![]() ![]() | FromStream(Stream) | Creates an Image from the specified data stream. |
![]() ![]() | FromStream(Stream, Boolean) | Creates an Image from the specified data stream, optionally using embedded color management information in that stream. |
![]() ![]() | FromStream(Stream, Boolean, Boolean) | Creates an Image from the specified data stream, optionally using embedded color management information and validating the image data. |
![]() | GetBounds(GraphicsUnit) | Gets the bounds of the image in the specified unit. |
![]() | GetEncoderParameterList(Guid) | Returns information about the parameters supported by the specified image encoder. |
![]() | GetFrameCount(FrameDimension) | Returns the number of frames of the specified dimension. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetLifetimeService() | Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.) |
![]() ![]() | GetPixelFormatSize(PixelFormat) | Returns the color depth, in number of bits per pixel, of the specified pixel format. |
![]() | GetPropertyItem(Int32) | Gets the specified property item from this Image. |
![]() | GetThumbnailImage(Int32, Int32, Image.GetThumbnailImageAbort, IntPtr) | Returns a thumbnail for this Image. |
![]() | GetType() | |
![]() | InitializeLifetimeService() | Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.) |
![]() ![]() | IsAlphaPixelFormat(PixelFormat) | Returns a value that indicates whether the pixel format for this Image contains alpha information. |
![]() ![]() | IsCanonicalPixelFormat(PixelFormat) | Returns a value that indicates whether the pixel format is 32 bits per pixel. |
![]() ![]() | IsExtendedPixelFormat(PixelFormat) | Returns a value that indicates whether the pixel format is 64 bits per pixel. |
![]() | MemberwiseClone() | |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.) |
![]() | RemovePropertyItem(Int32) | Removes the specified property item from this Image. |
![]() | RotateFlip(RotateFlipType) | Rotates, flips, or rotates and flips the Image. |
![]() | Save(Stream, ImageCodecInfo, EncoderParameters) | Saves this image to the specified stream, with the specified encoder and image encoder parameters. |
![]() | Save(Stream, ImageFormat) | Saves this image to the specified stream in the specified format. |
![]() | Save(String) | Saves this Image to the specified file or stream. |
![]() | Save(String, ImageCodecInfo, EncoderParameters) | Saves this Image to the specified file, with the specified encoder and image-encoder parameters. |
![]() | Save(String, ImageFormat) | Saves this Image to the specified file in the specified format. |
![]() | SaveAdd(EncoderParameters) | Adds a frame to the file or stream specified in a previous call to the Save method. Use this method to save selected frames from a multiple-frame image to another multiple-frame image. |
![]() | SaveAdd(Image, EncoderParameters) | Adds a frame to the file or stream specified in a previous call to the Save method. |
![]() | SelectActiveFrame(FrameDimension, Int32) | Selects the frame specified by the dimension and index. |
![]() | SetPropertyItem(PropertyItem) | Stores a property item (piece of metadata) in this Image. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ISerializable.GetObjectData(SerializationInfo, StreamingContext) | Populates a SerializationInfo with the data needed to serialize the target object. |
The following code example is designed for use with Windows Forms. It is a handler for the Paint event. A 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.
Available since 1.1
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.





