TdxSmartImage Class
A universal container designed to store images in different formats.
Declaration
TdxSmartImage = class(
TdxGPImage
)
Remarks
The TdxSmartImage
class implements a universal image container with support for the following formats:
- Device-independent bitmap (BMP or DIB)
- Graphics Interchange Format (GIF) with support for animation
- Joint Photographic Experts Group (JPG, JPEG, etc.)
- Portable Network Graphics (PNG)
- Tagged Image File Format (TIFF)
- Scalable Vector Graphics (SVG)
Main API Members
The list below outlines key members of the TdxSmartImage
class that allow you to load and manage images in all supported formats.
- Create an image container filled with a solid color (CreateSize).
- Create an image container from different sources (CreateFromBitmap, CreateFromHBitmap, CreateFromBits, and CreateFromStream).
- Replace the stored image with content of another image container (Assign, AssignFromGraphic, and AssignFromSmartImage).
- Check if content of two image containers is identical (Compare).
- Load an image to an existing image container (LoadFromBits, LoadFromFieldValue, LoadFromResource, and LoadFromStream).
- Copy image data between the image container and the clipboard (CopyToClipboard, CutToClipboard, and PasteFromClipboard).
- Identify stored image dimensions (ClientRect and Size).
- Scale the stored image (Resize and Scale).
- Convert the stored image to any supported format (ImageCodec).
- Identify if the stored image has transparent pixels (IsAlphaUsed).
- Suspend and restore the image container to optimize GDI resource usage (Dormant and HandleNeeded).
- Save the stored image to a file or stream (SaveToStream, SaveToStreamByCodec, and SaveToFile).
- Calculate a CRC32 hash code from stored image data (GetHashCode).
- Rasterize the stored vector image (ConvertToBitmap).
- Obtain the stored image as a TBitmap container (GetAsBitmap).
- Fill the stored image with a solid color (ChangeColor).
- Obtain the stored image as an array of pixel color values (GetBitmapBits).
- Copy the image container (Clone).
- Flip the stored image horizontally or vertically (Flip).
- Blend images from two image containers (MakeComposition).
- Draw the stored image (CreateCanvas and StretchDraw).
Direct TdxSmartImage Class References
The following public API members reference a TdxSmartImage
object:
- TdxTileControlCustomStyle.Texture
- Specifies a tile control element’s background image.
- TdxTileControlActionBarItem.Glyph
- Specifies the action bar item’s image.
Inheritance
See Also