Home | Sign in | English EN
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
dLoadImage (Function)
In french: dChargeImage
Loads an image in an Image variable from a memo, a file or a binary buffer (buffer containing the full data of a recognized image file).
Versions 18 and later
Java This function is now available for Java applications.
New in version 18
Java This function is now available for Java applications.
Java This function is now available for Java applications.
// Load an image from a file in the executable directory
MyImage is Image
MyImage = dLoadImage("image.png")
sPDFFileName is string = fDataDir() + fSep() + "MyFile.pdf"
// Load a vector image (here a PDF, it could be an SVG)
// Retrieve the characteristics of the image
sPDFInfo is string = BitmapInfo(sPDFFileName)
// Vector images are transformed into bitmap images (raster, therefore not vector images)
// Define the desired image resolution
nDesiredDPI is int = 300
set nPixelWidth = Val(ExtractString(sPDFInfo,2))*nDesiredPDI / 96
set nPixelHeight = Val(ExtractString(sPDFInfo,3))*nDesiredPDI / 96
// (Divided by 96 because it is the resolution used
// to define the size of a vector image with BitmapInfo)
// Load the image on the screen in an Image control with the size corresponding to the desired DPI
IMG_PDF = dLoadImage(sPDFFileName, imgConvert, nPixelWidth,nPixelHeight)
// Or if the image is not displayed, use an Image variable:
MyImage is Image = dLoadImage(sPDFFileName, imgConvert, nPixelWidth, nPixelHeight)
<Result> = dLoadImage(<Image> [, <Options> [, <Width> [, <Height>]]])
<Result>: Image variable
Name of Image variable into which the image will be loaded.
<Image>: Character string
Image to load. This image can correspond to:
  • the full path of image file,
  • the name of an image file (if the image file is found in the executable directory),
  • a binary memo item found in a data file,
  • a binary buffer containing the full data of a recognized image file (result of a function for saving images such as dSaveImagePNG).
<Options>: Optional Integer constant
Options for loading the image:
imgConvertConvert an image from the 8-bit format to the 24-bit format. This option is used to apply the effect algorithms to this image for example. This constant can be used for the images corresponding to PDF files for example.
For the vectorial images (SVG), this constant is mandatory. It is used to specify that the image must be converted into bitmap image (raster) before it is loaded (indeed, the Image type does not support the vectorial images).
(Default value)
Load the image as it is.
<Width>: Optional integer
Requested destination width (vectorial image only). This width is expressed in pixels.
<Height>: Optional integer
Requested destination height (vectorial image only). This height is expressed in pixels.
Component: wd260pnt.dll
Minimum version required
  • Version 17
This page is also available for…
Click [Add] to post a comment