Description
| Generates a rasterized view of one or more images, with optional full-view and download link icons.
Parameter
| Description
| Files[()]
| String (Array). The complete path and file name(s) of images to be shown in the viewer. Use a string for a single file and a string array variable for multiple files
| Size
| Long. Images are previewed in a square box. Size determine the width and height in pixels.
| InputClassName
| Optional, referes to a CSS class for styling.
| AllowView
| Optional, if True, A full-screen view link icon is placed in the lower right corner of the preview image. Default value when omitted: True
| AllowDownload
| Optional, if True, A download link icon is placed in the lower right corner of the preview image. Default value when omitted: True
|
|
Example
| Sub Main ' Sample CCL script to test the htmMediaViewer function Dim html As String Dim ImageFiles As Variant ' Define image files ImageFiles = Array("C:\TEMP\DSC_0240.JPG", "C:\TEMP\DSC_0241.JPG", "C:\TEMP\DSC_0318.JPG", "C:\TEMP\DSC_0324.JPG") TrmPrint "<html><head>" TrmPrint "<title>Test htmMediaViewer</title>" TrmPrint "<style>" TrmPrint "body { font-family: Arial, sans-serif; margin: 20px; }" TrmPrint ".media-gallery { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }" TrmPrint ".thumb { border: 2px solid #ccc; cursor: pointer; transition: 0.3s; }" TrmPrint ".thumb:hover { border-color: #007bff; }" TrmPrint "</style>" TrmPrint "</head><body>" TrmPrint "<h2>Test htmMediaViewer <span style='color: #0000FF; font-weight: bold;'>Function</span></h2>" TrmPrint HtmMediaViewer(ImageFiles, 150) TrmPrint "</body></html>" End Sub
|