<PackageReference Include="System.Drawing.Common" Version="9.0.0-rc.2.24474.1" />

Image

An abstract base class that provides functionality for the Bitmap and Metafile descended classes.
public sealed delegate GetThumbnailImageAbort : MulticastDelegate

Provides a callback method for determining when the GetThumbnailImage method should prematurely cancel execution.

public int Flags { get; }

Gets attribute flags for the pixel data of this Image.

public Guid[] FrameDimensionsList { get; }

Gets an array of GUIDs that represent the dimensions of frames within this Image.

public int Height { get; }

Gets the height, in pixels, of this Image.

public float HorizontalResolution { get; }

Gets the horizontal resolution, in pixels per inch, of this Image.

public ColorPalette Palette { get; set; }

Gets or sets the color palette used for this Image.

public SizeF PhysicalDimension { get; }

Gets the width and height of this image.

public PixelFormat PixelFormat { get; }

Gets the pixel format for this Image.

public int[] PropertyIdList { get; }

Gets IDs of the property items stored in this Image.

public PropertyItem[] PropertyItems { get; }

Gets all the property items (pieces of metadata) stored in this Image.

public ImageFormat RawFormat { get; }

Gets the file format of this Image.

public Size Size { get; }

Gets the width and height, in pixels, of this image.

public object Tag { get; set; }

Gets or sets an object that provides additional data about the image.

public float VerticalResolution { get; }

Gets the vertical resolution, in pixels per inch, of this Image.

public int Width { get; }

Gets the width, in pixels, of this Image.

public static Image FromFile(string filename)

Creates an Image from the specified file.

public static Image FromFile(string filename, bool useEmbeddedColorManagement)

Creates an Image from the specified file using embedded color management information in that file.

public static Bitmap FromHbitmap(IntPtr hbitmap)

Creates a Bitmap from a handle to a GDI bitmap.

public static Bitmap FromHbitmap(IntPtr hbitmap, IntPtr hpalette)

Creates a Bitmap from a handle to a GDI bitmap and a handle to a GDI palette.

public static Image FromStream(Stream stream)

Creates an Image from the specified data stream.

public static Image FromStream(Stream stream, bool useEmbeddedColorManagement)

Creates an Image from the specified data stream, optionally using embedded color management information in that stream.

public static Image FromStream(Stream stream, bool useEmbeddedColorManagement, bool validateImageData)

Creates an Image from the specified data stream, optionally using embedded color management information and validating the image data.

public static int GetPixelFormatSize(PixelFormat pixfmt)

Returns the color depth, in number of bits per pixel, of the specified pixel format.

public static bool IsAlphaPixelFormat(PixelFormat pixfmt)

Returns a value that indicates whether the pixel format for this Image contains alpha information.

public static bool IsCanonicalPixelFormat(PixelFormat pixfmt)

Returns a value that indicates whether the pixel format is 32 bits per pixel.

public static bool IsExtendedPixelFormat(PixelFormat pixfmt)

Returns a value that indicates whether the pixel format is 64 bits per pixel.

public object Clone()

Creates an exact copy of this Image.

public void Dispose()

Releases all resources used by this Image.

protected virtual void Dispose(bool disposing)

Releases the unmanaged resources used by the Image and optionally releases the managed resources.

public RectangleF GetBounds(ref GraphicsUnit pageUnit)

Gets the bounds of the image in the specified unit.

Returns information about the parameters supported by the specified image encoder.

public int GetFrameCount(FrameDimension dimension)

Returns the number of frames of the specified dimension.

public PropertyItem GetPropertyItem(int propid)

Gets the specified property item from this Image.

public Image GetThumbnailImage(int thumbWidth, int thumbHeight, GetThumbnailImageAbort callback, IntPtr callbackData)

Returns a thumbnail for this Image.

public void RemovePropertyItem(int propid)

Removes the specified property item from this Image.

public void RotateFlip(RotateFlipType rotateFlipType)

Rotates, flips, or rotates and flips the Image.

public void Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)

Saves this image to the specified stream, with the specified encoder and image encoder parameters.

public void Save(Stream stream, ImageFormat format)

Saves this image to the specified stream in the specified format.

public void Save(string filename)

Saves this Image to the specified file or stream.

public void Save(string filename, ImageCodecInfo encoder, EncoderParameters encoderParams)

Saves this Image to the specified file, with the specified encoder and image-encoder parameters.

public void Save(string filename, ImageFormat format)

Saves this Image to the specified file in the specified format.

public void SaveAdd(Image image, EncoderParameters encoderParams)

Adds a frame to the file or stream specified in a previous call to the Save method.

public void SaveAdd(EncoderParameters encoderParams)

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.

public int SelectActiveFrame(FrameDimension dimension, int frameIndex)

Selects the frame specified by the dimension and index.

public void SetPropertyItem(PropertyItem propitem)

Stores a property item (piece of metadata) in this Image.