|
|
|
|
|
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).
MyImage is Image
MyImage = dLoadImage("image.png")
sPDFFileName is string = fDataDir() + fSep() + "MyFile.pdf"
sPDFInfo is string = BitmapInfo(sPDFFileName)
nDesiredDPI is int = 300
set nPixelWidth = Val(ExtractString(sPDFInfo,2))*nDesiredPDI / 96
set nPixelHeight = Val(ExtractString(sPDFInfo,3))*nDesiredPDI / 96
IMG_PDF = dLoadImage(sPDFFileName, imgConvert, nPixelWidth,nPixelHeight)
MyImage is Image = dLoadImage(sPDFFileName, imgConvert, nPixelWidth, nPixelHeight)
Syntax
<Result> = dLoadImage(<Image> [, <Options> [, <Width> [, <Height>]]])
<Result>: Image variable Name of the Image variable into which the image must be loaded. <Image>: Character string Image to load. This image can correspond to: - the full path of the image file,
- the name of an image file (if the image file is located in the executable directory),
- a binary memo item 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: | | imgConvert | Convert 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). | imgDefault (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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|