<PackageReference Include="System.Drawing.Common" Version="8.0.0" />

Bitmap

public sealed class Bitmap : Image
Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes. A Bitmap is an object used to work with images defined by pixel data.
public Bitmap(Image original)

Initializes a new instance of the Bitmap class from the specified existing image.

public Bitmap(Image original, Size newSize)

Initializes a new instance of the Bitmap class from the specified existing image, scaled to the specified size.

public Bitmap(Image original, int width, int height)

Initializes a new instance of the Bitmap class from the specified existing image, scaled to the specified size.

public Bitmap(int width, int height)

Initializes a new instance of the Bitmap class with the specified size.

public Bitmap(int width, int height, Graphics g)

Initializes a new instance of the Bitmap class with the specified size and with the resolution of the specified Graphics object.

public Bitmap(int width, int height, PixelFormat format)

Initializes a new instance of the Bitmap class with the specified size and format.

public Bitmap(int width, int height, int stride, PixelFormat format, IntPtr scan0)

Initializes a new instance of the Bitmap class with the specified size, pixel format, and pixel data.

public Bitmap(Stream stream)

Initializes a new instance of the Bitmap class from the specified data stream.

public Bitmap(Stream stream, bool useIcm)

Initializes a new instance of the Bitmap class from the specified data stream.

public Bitmap(string filename)

Initializes a new instance of the Bitmap class from the specified file.

public Bitmap(string filename, bool useIcm)

Initializes a new instance of the Bitmap class from the specified file.

public Bitmap(Type type, string resource)

Initializes a new instance of the Bitmap class from a specified resource.

public static Bitmap FromHicon(IntPtr hicon)

Creates a Bitmap from a Windows handle to an icon.

public static Bitmap FromResource(IntPtr hinstance, string bitmapName)

Creates a Bitmap from the specified Windows resource.

public Bitmap Clone(Rectangle rect, PixelFormat format)

Creates a copy of the section of this Bitmap defined by Rectangle structure and with a specified PixelFormat enumeration.

public Bitmap Clone(RectangleF rect, PixelFormat format)

Creates a copy of the section of this Bitmap defined with a specified PixelFormat enumeration.

public IntPtr GetHbitmap()

Creates a GDI bitmap object from this Bitmap.

public IntPtr GetHbitmap(Color background)

Creates a GDI bitmap object from this Bitmap.

public IntPtr GetHicon()

Returns the handle to an icon.

public Color GetPixel(int x, int y)

Gets the color of the specified pixel in this Bitmap.

Locks a Bitmap into system memory.

public BitmapData LockBits(Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData)

Locks a Bitmap into system memory.

public void MakeTransparent()

Makes the default transparent color transparent for this Bitmap.

public void MakeTransparent(Color transparentColor)

Makes the specified color transparent for this Bitmap.

public void SetPixel(int x, int y, Color color)

Sets the color of the specified pixel in this Bitmap.

public void SetResolution(float xDpi, float yDpi)

Sets the resolution for this Bitmap.

public void UnlockBits(BitmapData bitmapdata)

Unlocks this Bitmap from system memory.