System::Drawing::Image class

Image class

A base class for System::Drawing::Bitmap and System::Drawing::Metafile classes providing basic functionality. 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 Image : public virtual System::IDisposable

Methods

MethodDescription
virtual Clone()Creates a copy of the current object.
Dispose() overrideReleases all resources aquired by the current object.
static FromFile(const String&, bool)Creates an Image object from the specified file.
static FromHbitmap(IntPtr)Constructs a Bitmap object from the specified GDI bitmap.
static FromStream(const SharedPtr<System::IO::Stream>&, bool, bool)Creates an Image object from the specified stream.
virtual get_Flags() constReturns a bit-wise combination of ImageFlags enum values that represents the attributes of the image.
get_FrameDimensionsList() constReturns an array of GUIDs that represent the dimensions of frames within the image represented by the current object.
virtual get_Height() constReturns the height of the image in pixels.
get_HorizontalResolution() constReturns the horizontal resolution of the image represented by the current object in pixels per inch.
virtual get_Palette() constReturns the color palette used by the image represented by the current object.
virtual get_PixelFormat() constReturns the pixel format of the image represented by the current object.
virtual get_PropertyIdList() constGets IDs of the property items stored in this image.
virtual get_PropertyItems() constGets all the property items(pieces of metadata) stored in this image.
virtual get_RawFormat() constReturns the file format of the image represented by the current object.
get_Size() constReturns a Size object that represents the width and height of the image in pixels.
virtual get_Tag() constGets an object that provides additional data about the image.
get_VerticalResolution() constReturns the vertical resolution of the image represented by the current object in pixels per inch.
virtual get_Width() constReturns the width of the image in pixels.
GetBounds(GraphicsUnit&)Returns the image bounds in the specified measurement units.
GetFrameCount(const Imaging::FrameDimensionPtr&)Returns the number of frames of the specified frame dimension.
static GetPixelFormatSize(Imaging::PixelFormat)Returns the number of bits used to represent the color depth in the specified pixel format.
virtual GetSkBitmap() constReturns an underlying SkBitmap object.
GetThumbnailImage(int, int, Image::GetThumbnailImageAbort, IntPtr)Gets a thumbnail for this System::Drawing::Image object.
static IsAlphaPixelFormat(Imaging::PixelFormat)Determines if the specified pixel format contains alpha information.
virtual IsMultiImage() constReturns whether the original format is a multi-image.
virtual RotateFlip(RotateFlipType)Rotate image to multiple of 90 degrees and flip.
Save(const String&)Saves the image represented by the current object to the specified file in PNG format.
Save(const String&, const Imaging::ImageFormatPtr&)Saves the image represented by the current object to the specified file in the specified format.
Save(const SharedPtr<System::IO::Stream>&, const Imaging::ImageFormatPtr&)Saves the image represented by the current object to the specified stream in the specified format.
Save(const String&, const Imaging::ImageCodecInfoPtr&, const Imaging::EncoderParametersPtr&)Saves the image represented by the current object to the specified file using the specified encoder and encoder parameters.
Save(const SharedPtr<System::IO::Stream>&, const Imaging::ImageCodecInfoPtr&, const Imaging::EncoderParametersPtr&)Saves the image represented by the current object to the specified stream using the specified encoder and encoder parameters.
SaveAdd(const Imaging::EncoderParametersPtr&)Adds a frame to the file or stream specified in a previous call to the Save() method.
SaveAdd(const SharedPtr<Image>&, const Imaging::EncoderParametersPtr&)Adds a frame to the file or stream specified in a previous call to the Save() method.
SelectActiveFrame(const Imaging::FrameDimensionPtr&, int)Selects the specified frame.
virtual set_Palette(Imaging::ColorPalettePtr)Sets the color palette used by the image represented by the current object.
virtual set_Tag(const System::SharedPtr<System::Object>)Sets an object that provides additional data about the image.

Typedefs

TypedefDescription
GetThumbnailImageAbortA callback to cancel GetThumbnailImage execution.

See Also