ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / Managing databases / HFSQL
  • Overview
  • How to?
  • Managing HFSQL thumbnails
  • WLanguage properties associated with the HFSQL thumbnails
  • Notes
  • Size of control displaying the image and size of thumbnail
  • Number of thumbnails
  • Limitations
  • Version 9 and earlier
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
To optimize the display of images in your application or in your site, you have the ability to use HFSQL thumbnails.
An HFSQL thumbnail is an image automatically generated from an image stored in an HFSQL binary memo. One or more thumbnails of different sizes can be generated for each HFSQL binary memo item.
For example, the "ProductImage" item allows you to generate two HFSQL thumbnails:
  • a small thumbnail used in a Looper control,
  • a larger thumbnail used in the product forms.
The thumbnail that best suits the control used to display the image will be automatically selected by the HFSQL engine.
WEBDEV - Server code Remark: We advise you to display the thumbnails in a Thumbnail control (and not in an Image control).
Linux To use the HFSQL thumbnails in Linux, the libfreetype6 library (libfreetype.so.6) must be installed on the current computer.
How to?

Managing HFSQL thumbnails

To manage the HFSQL thumbnails:
  1. In the data model editor, select the data file containing the HFSQL binary memo item.
  2. Double-click the data file to display the description of items.
  3. Select the desired item.
  4. Check "Automatic management of thumbnails" and click "Edit".
  5. Specify the width and height (in pixels) of each thumbnail to generate.
  6. Validate.
Remark: The HFSQL thumbnails of an item are automatically generated:

WLanguage properties associated with the HFSQL thumbnails

The following WLanguage properties are used to manage HFSQL thumbnails:
InfoThumbnailGenerationThe InfoThumbnailGeneration property is used to determine if the thumbnails of an item have been generated successfully.
MaxThumbnailHeightThe MaxThumbnailHeight property is used to get and change the maximum height of a thumbnail of an Image item (binary memo).
MaxThumbnailWidthThe MaxThumbnailWidth property is used to get or change the maximum width of a thumbnail of an Image item (binary memo).
NbDescribedThumbnailThe NbDescribedThumbnail property is used to get the number of thumbnails expected for an item.
NbThumbnailThe NbThumbnail property is used to get the number of thumbnails generated for an item.
ThumbnailThe Thumbnail property is used to:
  • get the value of an item thumbnail. This item was defined in the data model editor or through programming.
  • get and change the image associated with a Thumbnail control.
Notes

Size of control displaying the image and size of thumbnail

The thumbnail that best suits the size of the control used to display the image will be automatically selected by the HFSQL engine.
If the size of the control used to display the image exceeds the size of the largest thumbnail, the image displayed in the control will correspond to the initial image found in the HFSQL binary memo.

Number of thumbnails

In most cases, one or two thumbnails are defined for each HFSQL binary memo. However, several thumbnails can be defined when the image is displayed in several controls of different sizes.
Remark: The larger the number of thumbnails per item is, the larger the size of the corresponding HFSQL binary memo will be.
Limitations
The thumbnails are available:
  • in HFSQL Classic and HFSQL Mobile mode: on the items of a data file, view or query.
  • in HFSQL Client/Server mode: for the items found in a data file only.
Linux The thumbnails are available in HFSQL Client/Server on the items of a data file.

Version 9 and earlier

The HFSQL thumbnails are not available in version 9 and earlier. Therefore, records written by an HFSQL 9 or lower engine cannot contain HFSQL thumbnails.
The table below presents the use of binary memos and thumbnails in an application in version 9 (or earlier) and in an application in version 19 that uses the same data files:
Application (or site) in version 9 and earlierApplication (or site) in version 19
New record written by an HFSQL engine version 9 or earlierDisplayed image: Binary memoDisplayed image: Binary memo
New record written by an HFSQL engine version 10 and laterDisplayed image: Binary memoDisplayed image: Thumbnail
Record written by an HFSQL engine version 9 (or earlier) and modified in version 19 (the value of the binary memo item is modified)Displayed image: Binary memoDisplayed image: Thumbnail
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help