Encapsulates the GDI+ Bitmap class. The Bitmap class inherits from the TRSGPImage class. The Image class provides methods for loading and saving vector images (metafiles) and raster images (bitmaps). The Bitmap class expands on the capabilities of the Image class by providing additional methods for creating and manipulating raster images.
To create a VCL TBitmap from the image, call CreateBitmap method. To copy a VCL TBitmap or TGraphic to the image, call Image.Assign(Bitmap) method. To copy the image to a VCL TBitmap, call Bitmap.Assign(RSGPImage);
Namespace: RSGdiPlusGraphics
|
Name
|
Description
|
|
Create
|
Overloaded. Create an empty bitmap
|
|
Create(String,Boolean)
|
Overloaded. Creates an image from the given filename. The useEmbeddedColorManagement parameter determines if the constructor should use the color correction according to color management information that is embedded in the image file. Embedded information can include ICC profiles, gamma values, and chromaticity information. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
Create(TStream,Boolean)
|
Overloaded. Creates an image from the given stream. The useEmbeddedColorManagement parameter determines if the constructor should use the color correction according to color management information that is embedded in the image stream. Embedded information can include ICC profiles, gamma values, and chromaticity information. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
Top
|
|
Name
|
Description
|
|
BitsPerPixel
|
Returns the number of bits per pixel (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
Bmp
|
Returns the image codec (encoder/decoder) for bitmaps
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
|
|
Canvas
|
Returns the canvas that owns the image (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
Decoders
|
Returns an array of all the image decoders supported by GDI+.
Windows GDI+ provides the Image class and the Bitmap class for storing images in memory and manipulating images in memory. GDI+ writes images to disk files with the help of image encoders and loads images from disk files with the help of image decoders. An encoder translates the data in an Image or Bitmap object into a designated disk file format. A decoder translates the data in a disk file to the format required by the Image and Bitmap objects. GDI+ has built-in encoders and decoders that support the following file types:
• BMP • GIF • JPEG • PNG • TIFF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GDI+ also has built-in decoders that support the following file types:
• WMF
• EMF
• ICON |
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
EmbeddedColorManagement
Returns whether the image applies color correction according to color management information that is embedded in the stream. Embedded information can include ICC profiles, gamma values, and chromaticity information. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
Encoders
Returns an array of all the image encoders supported by GDI+.
Windows GDI+ provides the Image class and the Bitmap class for storing images in memory and manipulating images in memory. GDI+ writes images to disk files with the help of image encoders and loads images from disk files with the help of image decoders. An encoder translates the data in an Image or Bitmap object into a designated disk file format. A decoder translates the data in a disk file to the format required by the Image and Bitmap objects. GDI+ has built-in encoders and decoders that support the following file types:
• BMP
• GIF
• JPEG
• PNG
• TIFF
GDI+ also has built-in decoders that support the following file types:
• WMF
• EMF
• ICON
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
Flags
Returns a set of flags that indicate certain attributes of this Image object. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
Gif
Returns the image codec (encoder/decoder) for GIFs
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
Handle
Handle of the graphics object, used by the MS GDI+ flat API routines (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
Height
Specifies the height, in pixels, of the bitmap
HorizontalResolution
Specifies the horizontal resolution, in dots per inch, of this bitmap
ImageType
Return the image type (bitmap, metafile, or unknown) of the image (Inherited from RSGdiPlusGraphics.TRSGPImage.)
Jpeg
Returns the image codec (encoder/decoder) for JPEGs
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
OnChange
Occurs when the graphics object changes.
Note
|
There are two events that are exactly the same, OnChanged and OnChange. The extra event name is to allow easier transition from other Delphi libraries, either the VCL (OnChanged) or FMX (OnChange) libraries. Use either one as needed. Only one event is triggered.
|
OnChanged
Occurs when the graphics object changes.
Note
|
There are two events that are exactly the same, OnChanged and OnChange. The extra event name is to allow easier transition from other Delphi libraries, either the VCL (OnChanged) or FMX (OnChange) libraries. Use either one as needed. Only one event is triggered.
|
Owner
Canvas that owns the object. The Canvas will free this graphics object if it is destroyed. However, to keep memory use under control, it is recommended that you free graphics objects when you are finished with them. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
PixelFormat
Returns the pixel format of this Image object. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
PixelFormatFlags
Returns a set of flags about the pixel format (Inherited from RSGdiPlusGraphics.TRSGPImage.)
Pixels[Integer,Integer]
Specifies the color of a specified pixel in this bitmap.
Png
Returns the image codec (encoder/decoder) for PNGs
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
RawFormat
Return a globally unique identifier ( GUID) that identifies the format of this Image object. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
Tiff
Returns the image codec (encoder/decoder) for TIFFs
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
VerticalResolution
Specifies the vertical resolution, in dots per inch, of this image.
Width
Specifies the width, in pixels, of the bitmap
Top
|
Name
|
Description
|
|
Assign(IRSGPImage)
|
Overloaded. Copies the input image to the current image (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
Assign(TPersistent)
|
Overloaded. Copies the data and properties of the source image to the current image. Can also be used to copy VCL graphic images to the current image. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
AssignTo(TPersistent)
|
Represents method AssignTo(TPersistent).
|
|
Changed
|
Call this method when the graphics object changes. It triggers an OnChange event. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
Clone
|
Creates a copy of the current image. It is the responsibility of the calling routing to free the new image. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
CloneI
|
Creates a copy of the current image. It is the responsibility of the calling routing to free the new image. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
CreateBitmap
|
Creates a VCL TBitmap from the image. It is the responsibility of the calling routing to free the bitmap. (Overrides RSGdiPlusGraphics.TRSGPImage.CreateBitmap.)
|
|
CreateBitmap(TRectF)
|
Overloaded. Creates a VCL TBitmap from a portion of the image. It is the responsibility of the calling routing to free the bitmap. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetBounds
|
Get the bounds rectangle, in pixels, of the image (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetCodec(Integer)
|
Returns the codec at the specified index in the list of codecs (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetDecoders
|
Returns an array of decoders (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetEncoders
|
Returns an array of encoders (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetHandle
|
Call this method to acquire a handle from the GDI+ flat API library (Overrides RSGdiPlusGraphics.TRSGPGraphicsObject.GetHandle.)
|
|
GetHeight
|
Returns the height, in pixels, of the image (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetHorizontalResolution
|
Returns the horizontal resolution, in dots per inch, of this image. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetThumbnail(Cardinal,Cardinal)
|
Overloaded. Creates a thumbnail image based on the current image. It is the responsibility of the calling routing to free the new thumbnail. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetThumbnail(Cardinal,Cardinal,ImageAbort,Pointer)
|
Overloaded. Creates a thumbnail image based on the current image. It is the responsibility of the calling routing to free the new thumbnail. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetThumbnailAbort(Cardinal,Cardinal,ImageAbort,Pointer)
|
Creates a thumbnail image based on the current image. It is the responsibility of the calling routing to free the new thumbnail. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetThumbnailI(Cardinal,Cardinal)
|
Creates a thumbnail image based on the current image. It is the responsibility of the calling routing to free the new thumbnail. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetVerticalResolution
|
Returns the vertical resolution, in dots per inch, of this image. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
GetWidth
|
Returns the width, in pixels, of the image (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
IndexOfCodec(TRSGPImageCodecInfos,TGUID)
|
Returns the index of the codecs array that matches the aCodec GUID. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
InitializeCodecs
|
Retrieves all the codecs from GDI+ (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
LoadFromBitmap(HBITMAP,HPALETTE)
|
Overloaded. Load the bitmap from a HBitmap
|
|
LoadFromBitmap(TBitmap)
|
Overloaded. Load the bitmap from a VCL TBitmap
|
|
LoadFromDirectDrawSurface(IDirectDrawSurface7)
|
Load the bitmap from a DirectDraw surface
|
|
LoadFromFile(String)
|
Load the image from a file (Overrides RSGdiPlusGraphics.TRSGPImage.LoadFromFile(String).)
|
|
LoadFromIcon(HICON)
|
Overloaded. Load the bitmap from an icon
|
|
LoadFromIcon(TIcon)
|
Overloaded. Load the bitmap from an icon
|
|
LoadFromResourceName(THandle,String)
|
Load the bitmap from a resource
|
|
LoadFromStream(TStream)
|
Load the image from a stream (Overrides RSGdiPlusGraphics.TRSGPImage.LoadFromStream(TStream).)
|
|
LockBits(TRectF,TRSGPImageLockFlags,TRSGPPixelFormatRec,TRSGPBitmapData)
|
Locks a rectangular portion of this bitmap and provides a temporary buffer that you can use to read or write pixel data in a specified format. Any pixel data that you write to the buffer is copied to the Bitmap object when you call UnlockBits.
|
|
Notification(TRSGPCanvas)
|
Called when the Canvas is releasing control of the graphics object. The canvas will no longer be responsible for freeing the graphics object. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
Prepare(TRectF,Single)
|
Prepare the graphics object for drawing. Graphics objects respond in this method to upcoming calls. For example, gradient brushes can make sure the gradient will cover the entire rectangle. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
QueryInterface(TGUID,Void)
|
Represents method QueryInterface(TGUID,Void). (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
ReleaseHandle
|
Releases the underlying GDI+ object back to the GDI+ library. (Overrides RSGdiPlusGraphics.TRSGPGraphicsObject.ReleaseHandle.)
|
|
RotateFlip(TRSGPRotateFlip)
|
Rotates and flips this image. (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
SaveToBitmap(TRSGPColor)
|
Overloaded. Save the bitmap to an HBitmap. The BackgroundColor parameter specifies the color to use for transparent pixels.
|
|
SaveToBitmap(TRSGPColor,TBitmap)
|
Overloaded. Save the bitmap to a VCL TBitmap. The BackgroundColor parameter specifies the color to use for transparent pixels.
If bitmap parameter is nil, then TBitmap will be created and needs to be freed by the calling routine.
|
|
SaveToFile(String)
|
Overloaded. Saves this image to a stream based on file extension of the filename (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
SaveToFile(String,TGUID,PGPEncoderParameters)
|
Overloaded. Saves this image to a file based on the Clsid format specified (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
SaveToIcon
|
Overloaded. Save the bitmap to an icon.
|
|
SaveToIcon(TIcon)
|
Overloaded. Save the bitmap to an icon.
If Icon parameter is nil, then TIcon will be created and needs to be freed by the calling routine.
|
|
SaveToStream(TStream,TGUID,PGPEncoderParameters)
|
Saves this image to a stream based on the Clsid format specified (Inherited from RSGdiPlusGraphics.TRSGPImage.)
|
|
SetDPIResolution(Single,Single)
|
Sets the horizontal and vertical resolution, in dots per inch, of this Bitmap object.
|
|
SetSize(Cardinal,Cardinal)
|
Sets the Width and Height, in pixels, of the bitmap.
|
|
UnlockBits(TRSGPBitmapData)
|
Unlocks a portion of this bitmap that was previously locked by a call to LockBits.
|
|
Update
|
Update native graphics object (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
_AddRef
|
Represents method _AddRef. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
_Release
|
Represents method _Release. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
Top
|