Bitmap Class

Encapsulates a 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.
Inheritance Hierarchy

Namespace:  System.Drawing
Assembly:  Aspose.Drawing (in Aspose.Drawing.dll) Version: 20.5.0.0 (20.05.0)
Syntax
C#
public class Bitmap : Image

The Bitmap type exposes the following members.

Constructors
  NameDescription
Public methodBitmap(Stream)
Initializes a new instance of the Bitmap class from the specified data stream.
Public methodBitmap(String)
Initializes a new instance of the Bitmap class from the specified file.
Public methodBitmap(Image)
Initializes a new instance of the Bitmap class from the specified existing image.
Public methodBitmap(Int32, Int32)
Initializes a new instance of the Bitmap class with the specified size.
Public methodBitmap(Stream, Boolean)
Initializes a new instance of the Bitmap class from the specified data stream.
Public methodBitmap(String, Boolean)
Initializes a new instance of the Bitmap class from the specified file.
Public methodBitmap(Image, Size)
Initializes a new instance of the Bitmap class from the specified existing image, scaled to the specified size.
Public methodBitmap(Int32, Int32, PixelFormat)
Initializes a new instance of the Bitmap class with the specified size and format.
Public methodBitmap(Image, Int32, Int32)
Initializes a new instance of the Bitmap class from the specified existing image, scaled to the specified size.
Properties
  NameDescription
Public propertyFlags
Gets the integer representing a bitwise combination of ImageFlags for this Image.
(Inherited from Image.)
Public propertyFrameDimensionsList
Gets an array of GUIDs that represent the dimensions of frames within this Image.
(Inherited from Image.)
Public propertyHeight
Gets the height, in pixels, of this Bitmap.
(Overrides ImageHeight.)
Public propertyHorizontalResolution
Gets the horizontal resolution, in pixels per inch, of this Image.
(Inherited from Image.)
Public propertyPalette
Gets or sets the color palette used for this Image.
(Inherited from Image.)
Public propertyPhysicalDimension
Gets the width and height of this image.
(Inherited from Image.)
Public propertyPixelFormat
Gets the pixel format for this Image.
(Inherited from Image.)
Public propertyPropertyIdList
Gets IDs of the property items stored in this Image.
(Inherited from Image.)
Public propertyPropertyItems
Gets all the property items (pieces of metadata) stored in this Image.
(Inherited from Image.)
Public propertyRawFormat
Gets the file format of this Image.
(Inherited from Image.)
Public propertySize
Gets the width and height, in pixels, of this image.
(Inherited from Image.)
Public propertyVerticalResolution
Gets the vertical resolution, in pixels per inch, of this Image.
(Inherited from Image.)
Public propertyWidth
Gets the width, in pixels, of this Bitmap.
(Overrides ImageWidth.)
Methods
  NameDescription
Public methodClone
Creates an exact copy of this Image.
(Inherited from Image.)
Public methodClone(Rectangle, PixelFormat)
Creates a copy of the section of this Bitmap defined by Rectangle structure and with a specified PixelFormat enumeration.
Public methodClone(RectangleF, PixelFormat)
Creates a copy of the section of this Bitmap defined with a specified PixelFormat enumeration.
Public methodDispose
Releases all resources used by this Image.
(Inherited from Image.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetBounds
Gets the bounds of the image in the specified unit.
(Inherited from Image.)
Public methodGetFrameCount
Returns the number of frames of the specified dimension.
(Inherited from Image.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetPixel
Gets the color of the specified pixel in this Bitmap.
Public methodGetThumbnailImage
Returns a thumbnail for this Image.
(Inherited from Image.)
Public methodGetType (Inherited from Object.)
Public methodLockBits
Locks a Bitmap into system memory.
Public methodMakeTransparent
Makes the specified color transparent for this Bitmap.
Public methodMakeTransparent(Color)
Makes the specified color transparent for this Bitmap.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodReadArgb32Pixels
Reads bitmap pixels in ARGB32 format into given array.
Public methodRotateFlip
This method rotates, flips, or rotates and flips the Image.
(Inherited from Image.)
Public methodSave(String)
Saves this Image to the specified file or stream.
(Inherited from Image.)
Public methodSave(Stream, ImageFormat)
Saves this image to the specified stream in the specified format.
(Inherited from Image.)
Public methodSave(String, ImageFormat)
Saves this Image to the specified file in the specified format.
(Inherited from Image.)
Public methodSave(Stream, ImageCodecInfo, EncoderParameters)
Saves this image to the specified stream, with the specified encoder and image encoder parameters.
(Inherited from Image.)
Public methodSave(String, ImageCodecInfo, EncoderParameters)
Saves this Image to the specified file, with the specified encoder and image-encoder parameters.
(Inherited from Image.)
Public methodSaveAdd(EncoderParameters)
Adds a frame to the file or stream specified in a previous call to the Save(String) method. Use this method to save selected frames from a multiple-frame image to another multiple-frame image.
(Inherited from Image.)
Public methodSaveAdd(Image, EncoderParameters)
Adds a frame to the file or stream specified in a previous call to the Save(String) method.
(Inherited from Image.)
Protected methodSaveInternal(Stream, ImageFormat)
Saves this Bitmap to the specified stream in the specified format.
(Overrides ImageSaveInternal(Stream, ImageFormat).)
Protected methodSaveInternal(String, ImageFormat)
Saves this Bitmap to the specified file in the specified format.
(Overrides ImageSaveInternal(String, ImageFormat).)
Public methodSelectActiveFrame
Selects the frame specified by the dimension and index.
(Inherited from Image.)
Public methodSetPixel
Sets the color of the specified pixel in this Bitmap.
Public methodSetResolution
Sets the resolution for this Bitmap.
Protected methodSetResolutionInternal
Sets the resolution for this Image.
(Inherited from Image.)
Public methodToString (Inherited from Object.)
Public methodUnlockBits
Unlocks this Bitmap from system memory.
Public methodWriteArgb32Pixels
Writes pixels to the bitmap.
See Also