9.3.2 Image size is important

When you use a Bitmap on your web page you can resize the image using the height and width properties or the layout managers. However, it is important to understand that if you load a 500Kb image into your bitmap definition, when you compile your web page a 500Kb image file will be generated, even if you are only displaying the image as 25x25. When running your application in a browser this image is downloaded to the web client to display.

So if a Web Page includes the following images from the Repository:

Begin_Com Role(*EXTENDS #PRIM_WEB)

 

Define_Com Class(#PRIM_IMAG) Name(#Image1) Displayposition(3) Height(572) Image(#myimage3) Left(297) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(29) Width(500)

Define_Com Class(#PRIM_IMAG) Name(#Image2) Displayposition(4) Height(384) Image(#myimage2) Left(839) Parent(#COM_OWNER) Tabposition(4) Tabstop(False) Top(214) Width(512)

Define_Com Class(#PRIM_IMAG) Name(#Image3) Displayposition(5) Height(174) Image(#myimage1) Left(520) Parent(#COM_OWNER) Tabposition(5) Tabstop(False) Top(663) Width(290)

 

The group of files generated when this page is compiled will be something like this, with an image file corresponding to each unique image included. In addition a .res (resource) file which associates the group of objects to the Web Page by providing a list of resources used on the page.