ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Image control
  • Overview
  • Optimizing the size of the image
  • Location of the image
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
Several images can be used when developing a WEBDEV site.
A wizard is automatically displayed when an image is added to a WEBDEV site. This wizard is used to manage:
  • the size of the image. The image can be compressed if its size is too important for an optimized display on the Web.
  • the location of the image. The image must be found in an accessible directory otherwise it will not be displayed.
Optimizing the size of the image
Any new image added into a WEBDEV page is automatically checked. A wizard is automatically displayed if the size of the selected image exceeds 20 KB. This wizard proposes to compress the image to optimize its load time. You also have the ability to perform no modification on the image.
To compress the image:
  1. In the wizard, select "Compress the image and reduce its quality". Go to the next plane.
  2. Select the requested format and its characteristics:
    • JPEG format: You have the ability to define the quality of the image and to choose a progressive JPEG. In this case, the page will be displayed immediately and the image will be displayed progressively. The load operation of the image will not lock the display of the page.
    • GIF format: You have the ability to define the number of colors supported by this format.
    • PNG format.
      According to the selected format and to its options, the preview of the result image is automatically displayed.
  3. Select (if necessary) the new size of the image. WEBDEV enables you to reduce the size of the image while keeping the proportions. Go to the next plane: the wizard enables you to select the location of the image.
Location of the image
WEBDEV proposes two locations for the image:
  • the image is located in the directory of the site (<Project Name>_WEB).
  • the image is kept in its initial directory.
Let's take a look at this two solutions.
1. The image is located in the directory of the site (<Project Name>_WEB directory). This method is recommended.
The image can be located in a specific directory of the sub-directory of the site (an Interface sub-directory to group all the images for example).
In this case:
  • the image is copied once for all into the specified directory (even if it is used several times in the site).
  • this image is directly used by the pages of the site.
  • the possible modifications will be performed on the image found in the directory of the site.
  • the image keeps its name, so the referencing of the site is easier.
  • if a conversion is required, it is performed when the image is copied into the directory.
2. The image is stored in its initial directory.
In this case:
  • the image is automatically copied into the directory of the site whenever the HTML page is generated.
  • the possible modifications made to the image must be performed in the directory of the site.
  • the image is generated with a name defined by WEBDEV.
  • if a conversion is required, this conversion is performed whenever the page containing the image is generated.
This second option is useful in the following cases:
  • when the initial image must be shared with other projects.
  • when the image must be kept in its initial format.
Caution: This option increases the time for generating the pages and it does not allow you to reference the images properly.
Minimum version required
  • Version 14
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help