System::Drawing::Bitmap class

Bitmap class

Represents a GDI+ bitmap image. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class Bitmap : public System::Drawing::Image

Methods

MethodDescription
BeginPixelProcessing(bool)Enables pixel processing mode.
Bitmap(const SharedPtr<Image>&)Constructs a new Bitmap object from the specified existing image.
Bitmap(const SharedPtr<System::IO::Stream>&, bool)Constructs a new Bitmap object from the specified stream.
Bitmap(const String&)Constructs a new Bitmap object from the specified file.
Bitmap(const String&, bool)Constructs a new Bitmap object from the specified file.
Bitmap(int, int, Imaging::PixelFormat)Constructs a new Bitmap object that represents a bitmap image with the specified width, height, pixel format and pixel data.
Bitmap(const SharedPtr<Image>&, const Size&)Constructs a new Bitmap object from the specified existing image, scaled to the specified size.
Bitmap(const SharedPtr<Image>&, int, int)Constructs a new Bitmap object from the specified existing image with width and height scaled to the specified values.
Clone() overrideCreates a copy of the current object.
Clone(Rectangle, Imaging::PixelFormat)Creates a Bitmap object that represents a copy of a region of the bitmap image represented by the current object.
Clone(RectangleF, Imaging::PixelFormat)Creates a Bitmap object that represents a copy of a region of the bitmap image represented by the current object.
ComputeHash()Computes the SHA1 hash value.
static ConvertToARGBImage(const SharedPtr<Bitmap>&)Creates a copy of the specified bitmap image with pixel format changed to Format32bppArgb.
EndPixelProcessing(bool)Disables pixel processing mode.
get_Height() const overrideReturns the height of the image in pixels.
get_Palette() const overrideReturns the color palette used by the image represented by the current object.
get_PixelFormat() const overrideReturns the pixel format of the image represented by the current object.
get_RawFormat() const overrideReturns the file format of the image represented by the current object.
get_Width() const overrideReturns the width of the image in pixels.
GetHbitmap()Creates a GDI bitmap object from the bitmap represented by the current object.
GetPixel(int, int)Returns the color of the specified pixel.
GetSkBitmap() const overrideReturns a raw pointer to the underlying SkBitmap object.
IsMultiImage() const overrideReturns whether the original format is a multi-image.
LockBits(const Rectangle&, Imaging::ImageLockMode, Imaging::PixelFormat)Locks a Bitmap into system memory.
LockBits(const Rectangle&, Imaging::ImageLockMode, Imaging::PixelFormat, const Imaging::BitmapDataPtr&)Locks a Bitmap into system memory.
MakeTransparent(Color)Changes the color of all pixels with the specified color to transparent.
MEMBER_FUNCTION_MAKE_OBJECT(Bitmap, CODEPORTING_ARGS(const SharedPtr<Image>&original, int width, int height), CODEPORTING_ARGS(original, width, height))
PremultipleColors()Premultiplies the colors of the pixels of the image represented by the current object.
RotateFlip(RotateFlipType) overrideRotates image to multiple of 90 degrees and flips.
set_Palette(Imaging::ColorPalettePtr) overrideSets the color palette used by the image represented by the current object.
SetPixel(int, int, Color)Sets the color of the specified pixel in the bitmap image represented by the current object.
SetResolution(float, float)Sets the resolution of the image.
UnlockBits(const Imaging::BitmapDataPtr&)Unlocks the specified bitmap from system memory.

See Also