TRVHTMLSaveProperties.ImageOptions

<< Click to display table of contents >>

TRVHTMLSaveProperties.ImageOptions

Options for saving images in HTML.

type // Defined in RVStyle.pas
  TRVHTMLSaveImageOption = (
    rvhtmlsioInlineImages,
    rvhtmlsioUseItemImageFileNames,
    rvhtmlsioImageSizes,

    rvhtmlsioImageSizeAttributes,
    rvhtmlsioOverrideImages
    );
  TRVHTMLSaveImageOptions = 
    set of TRVHTMLSaveImageOption;

 

property ImageOptions: TRVHTMLSaveImageOptions;

(introduced in version 21, changed in v22)

Option

Meaning

rvhtmlsioInlineImages

If set, images are stored directly in HTML file (in base64 encoding).

If not set, images are stored in external files.

rvhtmlsioUseItemImageFileNames

If included, images with defined (non-empty) file names will not be saved, but their file names will be written in HTML.

File names for items are defined in rvespImageFileName string property.

This option has higher priority than rvhtmlsioInlineImages.

See the explanation below this table.

rvhtmlsioImageSizes

If set, TRichView saves widths and heights of images in HTML explicitly, even for non-resized images.

This option does not affect pictures having defined rvepImageWidth and/or rvepImageHeight item extra integer properties. Sizes are always saved for such images.

You can override this setting for the specific item using rveoNoHTMLImagesSize item extra integer properties .

rvhtmlsioImageSizeAttributes

If set, widths and height of images are always saved as attributes of <img>, not as CSS properties.

Note: the current version of Microsoft Outlook does not understand image sizes specified in CSS [2023].

rvhtmlsioOverrideImages

This option is used if images are stored in external files (i.e., rvhtmlsioInlineImages is not included).

If set, TRichView can override existing images.

If not set, TRichView generates unique names for images.

When TRichView saves an image in HTML, the following steps are performed:

1.OnHTMLSaveImage event occurs. If rvhtmlsioUseItemImageFileNames is included, rvespImageFileName string property is used as the initial value of image path.
If the image is not saved in this event, then

2.If rvhtmlsioUseItemImageFileNames is included, and value of rvespImageFileName string property is not empty, it is written to HTML; the image file is not saved.
Otherwise

3.OnSaveImage2 occurs.
If the image is not saved in this event, then

4.If rvhtmlsioInlineImages is included, the image is saved directly in HTML (base64-encoded).
Otherwise

5.The image is stored in an external file. A name of this file is auto-generated using rvhtmlsioOverrideImages option and ImagesPrefix property.

On the two last steps, non-web images (such as icons or metafiles) are saved as Jpeg images.

Default value:

for TRichView, TRichViewEdit, TDBRichView: []

for TDBRichViewEdit, TcxTRichViewEdit.Properties: [rvhtmlsioInlineImages]

See also

TRVMarkdownProperties.SaveOptions (has similar options for saving images in Markdown)