TdxCustomSmartImage Class
The base class for all classes that implement Smart Image containers.
Declaration
TdxCustomSmartImage = class(
TGraphic
)
Remarks
This class implements the core functionality required by the universal DevExpress image container (Smart Image container, for short) providing a unified approach to loading, storing, and managing images in various graphical formats.
The TdxCustomSmartImage class implements the following members that allow you to:
Create a Smart Image filled with a specific color (CreateSize).
Create a Smart Image from various sources (CreateFromBitmap, CreateFromHBitmap, CreateFromBits, and CreateFromStream).
Create a copy of an existing Smart Image (Clone).
Replace the stored image with another image container’s content (Assign, AssignFromGraphic and AssignFromSmartImage).
Compare two Smart Images to identify if they are identical (Compare).
Load an image to an existing Smart Image container (LoadFromBits, LoadFromFieldValue, LoadFromResource, and LoadFromStream).
Transfer the image data between the Smart Image and the clipboard (CopyToClipboard, CutToClipboard, and PasteFromClipboard).
Identify the stored image’s dimensions (ClientRect and Size).
Identify if the stored image has transparent pixels (IsAlphaUsed).
Convert the stored image to any supported format (ImageCodec).
Suspend and restore the Smart Image to optimize the use of GDI resources by your application (Dormant and HandleNeeded).
Save the stored image to a stream object (SaveToStream and SaveToStreamByCodec).
Save the stored image to a file in a specific format (SaveToFile).
Calculate a CRC32 hash code from the stored image data (GetHashCode).
Rasterize the stored vector image (ConvertToBitmap).
Obtain the stored image data as a TBitmap object (GetAsBitmap).
Obtain the stored image data as an array of pixel color data (GetBitmapBits).
Fill the stored image with a specific color (ChangeColor).
Remove image data from the Smart Image (Clear).
Change the currently displayed frame of a multi-frame image (ActiveFrame).
Identify the number of frames in a multi-frame image (AnimationFrameCount).
Track and manage the animation playback for the stored animated image (Animation, AnimationLoop, AnimationLoopCount, AnimationLoopIndex, StartAnimation, and StopAnimation).
You do not need to create instances of the TdxCustomSmartImage class. Use its descendants instead.