TTMSFNCCloudGoogleGmail.ImageToBase64 Method
Reads an image file and returns its base64-encoded data, optionally wrapped in an HTML img tag so it can be embedded inline in a message body.
API unit family: TMSFNCCloudGoogleGmail
Declaring type: TTMSFNCCloudGoogleGmail
Inherited from: TTMSFNCCustomCloudGoogleGmail
Syntax
function ImageToBase64(const AFileName: TTMSFNCUtilsFile; AIncludeImgTag: Boolean = True): string;
Parameters
| Name | Description |
|---|---|
AFileName |
File to encode. |
AIncludeImgTag |
When True, wraps the encoded data in an HTML img tag; when False, returns only the base64 data. |
Returns
The base64-encoded image data, with or without an img tag.