Smooth Image Scaling in TRichView

<< Click to display table of contents >>

Smooth Image Scaling in TRichView


TRichView can display scaled images using an advanced method producing smooth scaled images.

The following images are affected:

TCustomRichView.BackgroundBitmap (if BackgroundStyle=bsStretched);

pictures and hot-pictures (when stretched);

table.BackgroundImage (if BackgroundStyle=rvbsStretched);

table cells' BackgroundImage (if BackgroundStyle=rvbsStretched).

By default, only non-transparent bitmaps and JPEG images are scaled, and not greater to 3000 pixels in width or height. These settings can be changed using RVThumbnailMaker object.

Smooth scaling is applied when displaying pictures on the screen. It is not used when printing or displaying in TRVReportHelper.

srv_icon ScaleRichView note: in TSRichViewEdit, smooth scaling is applied to the same images, but they do not need to be stretched: they can be scaled when the whole page is scaled.


Smooth scaling is not a very fast operation, so resulting images are stored for reusing in future. Each TRichView component can store up to RichViewMaxThumbnailCount scaled images (+ a scaled version TCustomRichView.BackgroundBitmap, which is always stored).