ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
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: HFSQL thumbnails for a heading are generated automatically when:

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 gets and sets 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 programmatically.
  • 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.
Note: The greater the number of thumbnails per item, the larger the size of the corresponding HFSQL binary memo.
Limitations
The thumbnails are available:
  • in HFSQL Classic and HFSQL Mobile: on the fields of a data file, view or query.
  • in HFSQL Client/Server: on data file fields only.
Linux The thumbnails are available in HFSQL Client/Server on the data file items.

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 earlierImage displayed: Binary memoImage displayed: Binary memo
New record written by an HFSQL engine version 10 and laterImage displayed: 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)Image displayed: Binary memoDisplayed image: Thumbnail
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/21/2024

Send a report | Local help