Class Bitmap
Contents
[
Hide
]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.
public class Bitmap : Image
Constructors
Name | Description |
---|---|
Bitmap(Image) | Initializes a new instance of the Bitmap class from the specified existing image. |
Bitmap(Stream) | Initializes a new instance of the Bitmap class from the specified data stream. |
Bitmap(string) | Initializes a new instance of the Bitmap class from the specified file. |
Bitmap(Image, Size) | Initializes a new instance of the Bitmap class from the specified existing image, scaled to the specified size. |
Bitmap(int, int) | Initializes a new instance of the Bitmap class with the specified size. |
Bitmap(Stream, bool) | Initializes a new instance of the Bitmap class from the specified data stream. |
Bitmap(string, bool) | Initializes a new instance of the Bitmap class from the specified file. |
Bitmap(Image, int, int) | Initializes a new instance of the Bitmap class from the specified existing image, scaled to the specified size. |
Bitmap(int, int, PixelFormat) | Initializes a new instance of the Bitmap class with the specified size and format. |
Bitmap(int, int, int, PixelFormat, int[]) | Initializes a new instance of the Bitmap class with the specified size and pixel data. |
Properties
Name | Description |
---|---|
Flags { get; } | Gets the integer representing a bitwise combination of ImageFlags for this Image. |
override FrameDimensionsList { get; } | Gets an array of GUIDs that represent the dimensions of frames within this Image. |
override Height { get; } | Gets the height, in pixels, of this Bitmap. |
HorizontalResolution { get; } | Gets the horizontal resolution, in pixels per inch, of this Image. |
override Palette { get; set; } | Gets or sets the color palette used for this Image. |
PhysicalDimension { get; } | Gets the width and height of this image. |
override PixelFormat { get; } | Gets the pixel format for this Image. |
override PropertyIdList { get; } | Gets IDs of the property items stored in this Image. |
override PropertyItems { get; } | Gets all the property items (pieces of metadata) stored in this Image. |
override 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. |
override Width { get; } | Gets the width, in pixels, of this Bitmap. |
Methods
Name | Description |
---|---|
Clone() | Creates an exact copy of this Image. |
Clone(Rectangle, PixelFormat) | Creates a copy of the section of this Bitmap defined by Rectangle structure and with a specified PixelFormat enumeration. |
Clone(RectangleF, PixelFormat) | Creates a copy of the section of this Bitmap defined with a specified PixelFormat enumeration. |
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. |
GetPixel(int, int) | Gets the color of the specified pixel in this Bitmap. |
override GetPropertyItem(int) | Gets the specified property item from this Image. |
GetThumbnailImage(int, int, GetThumbnailImageAbort, IntPtr) | Returns a thumbnail for this Image. |
LockBits(Rectangle, ImageLockMode, PixelFormat) | Locks a Bitmap into system memory. |
MakeTransparent() | Makes the specified color transparent for this Bitmap. |
MakeTransparent(Color) | Makes the specified color transparent for this Bitmap. |
ReadArgb32Pixels(int[]) | Reads bitmap pixels in ARGB32 format into given array. |
override RemovePropertyItem(int) | Removes the specified property item from this Image. |
override 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. |
SetPixel(int, int, Color) | Sets the color of the specified pixel in this Bitmap. |
override SetPropertyItem(PropertyItem) | Stores a property item (piece of metadata) in this Image. |
SetResolution(float, float) | Sets the resolution for this Bitmap. |
UnlockBits(BitmapData) | Unlocks this Bitmap from system memory. |
WriteArgb32Pixels(int[]) | Writes pixels to the bitmap. |
See Also
- class Image
- namespace System.Drawing
- assembly Aspose.Drawing