Skip to main content

TdxOfficeImage Class

A universal image container compatible with popular document formats.

Declaration

TdxOfficeImage = class(
    TdxSmartImage
)

Remarks

The TdxOfficeImage class is a TGraphic descendant that implements an image container for Rich Edit and Document Server components.

Supported Image Formats

All supported formats are implemented as the following codec classes derived from the TdxSmartImageCodec class:

TdxGPImageCodecBMP
A Device-Independent Bitmap (BMP/DIB) image format codec.
TdxGPImageCodecGIF
A Graphics Interchange Format (GIF) codec.
TdxGPImageCodecJPEG
A Joint Photographic Experts Group (JPEG) image format codec.
TdxGPImageCodecPNG
A Portable Network Graphics (PNG) image format codec.
TdxGPImageCodecTIFF
A Tagged Image File Format (TIFF) codec.
TdxGPImageCodecWMF
A Windows Metafile (WMF) image format codec.

Main API Members

The list below outlines key API members of the TdxOfficeImage class that allow you to work with images.

Image Container Creation

This section contains TdxOfficeImage class constructors and other methods that allow you to create image containers.

Clone
Creates a new image container populated with a copy of the stored image.
CreateSize
Creates an image container filled with a specific color.
CreateFromBitmap | CreateFromHBitmap | CreateFromBits | CreateFromStream
Create an image container and populate it from the specified source.
GetAsBitmap
Creates a TBitmap container and populates it with the stored image.

Data Import and Export

Assign | AssignFromGraphic | AssignFromSmartImage
Repopulate the image container with an image from another image container.
CopyToClipboard | CutToClipboard | PasteFromClipboard
Move image data between the image container and the clipboard.
GetBitmapBits
Returns the stored image as an array of pixel data.
LoadFromBits | LoadFromFieldValue | LoadFromResource | LoadFromFile | LoadFromStream
Repopulate the image container from the specified source.
SaveToStream | SaveToStreamByCodec
Save the stored image to a stream.
SaveToFile
Saves the stored image to a file.

Content and Resource Management

Clear
Clears the image container.
ChangeColor
Fills all pixels of the stored image with a color.
ConvertToBitmap
Rasterizes the stored vector image.
CreateCanvas | StretchDraw
Draw the stored image.
Dormant | HandleNeeded
Allow you to suspend and restore the image container to optimize GDI resource usage.
Flip
Flips the stored image horizontally or vertically.
ImageCodec
Specifies the format of the stored image. You can use this property to convert the stored image to any supported format, except for SVG.
MakeComposition
These overloaded functions blend two images from two image containers using the alpha channel.
Resize | Scale
Scale the source image.

Animation and Multi-Frame Image Settings

ActiveFrame
Specifies the currently displayed frame in a multi-frame image.
AnimationFrameCount
Returns the number of frames in a multi-frame image.
Animation | AnimationLoop | AnimationLoopCount | AnimationLoopIndex | StartAnimation | StopAnimation
Allow you to track and manage animation playback for the stored animated image.

General-Purpose API Members

ClientRect | Size
Return stored image dimensions.
Compare
Compares two image containers.
GetHashCode
Calculates a CRC32 hash code from stored image data.
IsAlphaUsed
Allows you to identify if the stored image has transparent pixels.

Direct TdxOfficeImage Class References

The following public API members reference a TdxOfficeImage object:

IdxRichEditDocumentImage.Image
Provides access to the Office Image container that hosts the inline image’s source bitmap.
IdxRichEditShape.Picture
Provides access to the Office Image container that hosts the source bitmap of the floating shape (picture).
See Also