Class Image

Image class

An abstract base class that provides functionality for the Bitmap and Metafile descended classes.

public abstract class Image : IDisposable

Constructors

NameDescription
Image()Initializes a new instance of the Image class.

Properties

NameDescription
Flags { get; }Gets the integer representing a bitwise combination of ImageFlags for this Image.
abstract FrameDimensionsList { get; }Gets an array of GUIDs that represent the dimensions of frames within this Image.
abstract Height { get; }Gets the height, in pixels, of this Image.
HorizontalResolution { get; }Gets the horizontal resolution, in pixels per inch, of this Image.
abstract Palette { get; set; }Gets or sets the color palette used for this Image.
PhysicalDimension { get; }Gets the width and height of this image.
abstract PixelFormat { get; }Gets the pixel format for this Image.
abstract PropertyIdList { get; }Gets IDs of the property items stored in this Image.
abstract PropertyItems { get; }Gets all the property items (pieces of metadata) stored in this Image.
abstract RawFormat { get; }Gets the file format of this Image.
Size { get; }Gets the width and height, in pixels, of this image.
Tag { get; set; }Gets or sets an object that provides additional data about the image.
VerticalResolution { get; }Gets the vertical resolution, in pixels per inch, of this Image.
abstract Width { get; }Gets the width, in pixels, of this Image.

Methods

NameDescription
static FromFile(string)Creates an Image from the specified file.
static FromStream(Stream)Creates an Image from the specified data stream.
static FromStream(Stream, bool)Creates an Image from the specified data stream, optionally using embedded color management information in that stream.
Clone()Creates an exact copy of this Image.
virtual Dispose()Releases all resources used by this Image.
GetBounds(ref GraphicsUnit)Gets the bounds of the image in the specified unit.
GetFrameCount(FrameDimension)Returns the number of frames of the specified dimension.
abstract GetPropertyItem(int)Gets the specified property item from this Image.
GetThumbnailImage(int, int, GetThumbnailImageAbort, IntPtr)Returns a thumbnail for this Image.
abstract RemovePropertyItem(int)Removes the specified property item from this Image.
abstract RotateFlip(RotateFlipType)This method rotates, flips, or rotates and flips the Image.
Save(string)Saves this Image to the specified file or stream.
Save(Stream, ImageFormat)Saves this image to the specified stream in the specified format.
Save(string, ImageFormat)Saves this Image to the specified file in the specified format.
Save(Stream, ImageCodecInfo, EncoderParameters)Saves this image to the specified stream, with the specified encoder and image encoder parameters.
Save(string, ImageCodecInfo, EncoderParameters)Saves this Image to the specified file, with the specified encoder and image-encoder parameters.
SaveAdd(EncoderParameters)Adds a frame to the file or stream specified in a previous call to the one of Image.Save(…) methods. 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 one of Image.Save(…) methods.
SelectActiveFrame(FrameDimension, int)Selects the frame specified by the dimension and index.
abstract SetPropertyItem(PropertyItem)Stores a property item (piece of metadata) in this Image.
static FromHbitmap(IntPtr)Creates a Bitmap from a handle to a GDI bitmap.
static GetPixelFormatSize(PixelFormat)Returns the color depth, in number of bits per pixel, of the specified pixel format.
static IsAlphaPixelFormat(PixelFormat)Returns a value that indicates whether the pixel format for this Image contains alpha information.

Other Members

NameDescription
delegate GetThumbnailImageAbortProvides a callback method for determining when the GetThumbnailImage method should prematurely cancel execution.

See Also