The welcome page contains a static image FRImage1, FileName is 'imgdemo-main.png', PathInfo value is '/', i.e. the image file is assumed to be located in the WWW server's root directory. The image map MAP that was compiled during design includes two AREA elements: links to dynamic image examples 1 and 2, the HREF parameter is '<#SCRIPT_NAME>/DateTimeImg' and '<#SCRIPT_NAME>/BackGroundImg' respectively. The static image is sent to the client by the WWW server itself.
Dynamic image example 1:
Report form fDynamicImageRep. The form includes a dynamic image FRDynamicImage1, PNG is used as output format ImageType.
The image dimensions are set during design. In the OnDraw event the background, frame, current date and time as text are drawn.
ISAPIActionItem1 with directory path 'DateTimeImg' is used for activation.
Dynamic image example 2:
Report form fDynamicImage2Rep. The form includes a dynamic image FRDynamicImage1, JPEG is used as output format ImageType.
The background image is read in the BeforeDraw event, the filename of the background image is taken from the configuration parameter ISAPIApp.ConfigParams['Images']['Background1'].
In the OnDraw event, current date and time are drawn onto the background.
ISAPIActionItem2 with directory path 'BackGroundImg' is used for activation.
An HTML page containing a dynamic image is sent to the client in two stages:
First, the client receives an HTML page that has only a link to the respective dynamic image (to the same FReport report form, in the DLL sense). Then the client's browser requests the image files, the FReport is activated again with a request to send the relevant image. The relevant TFRDynamicImage creates the image and returns the result as a stream.