ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Controls, pages and windows / Drawing functions
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Warning
As of version 2025 Update 2, this function has been renamed ImageInfo.
Retrieves the characteristics of an image file or the characteristics of a PDF file:
  • format.
  • width and height.
  • number of bits per pixel.
  • AndroidiPhone/iPad area of transparency.
  • AndroidiPhone/iPad alpha channel.
AndroidAndroid Widget The PDF files are not supported.
New in version 2025
iPhone/iPad From version 2025 Update 2, this function is available for iPhone/iPad applications.
Example
Syntax
<Result> = ImageInfo(<Image file name> [, <Desired information>])
<Result>: Character string
  • AndroidiPhone/iPad Requested characteristic (if the <Requested information> parameter is specified).
  • All image characteristics in the following format:
    <Format> + TAB + <Width> + TAB + <Height> + TAB + <Bits/pixel>

    <Format>Character string
    • Three characters identifying the image format: "BMP", "GIF", "PDF", etc.
    • "BAD" if the image name is an non-existing file or if the format is unknown
    <Width>IntegerImage width in pixels.
    Note: The width and height can be inverted depending on the position of the (0,0) point of the image. To get the width and height taking into account the orientation of the image, use a variable of type Image.
    <Height>IntegerImage height in pixels.
    Note: The width and height can be inverted depending on the position of the (0,0) point of the image. To get the width and height taking into account the orientation of the image, use a variable of type Image.
    <Bits/pixel>Character stringNumber of bits per pixel:
    • 1 (monochrome image)
    • 4 (16-color palette)
    • 8 (256-color palette)
    • 24 (no palette, 16 millions of colors)
    • 32 (no palette, true color)
    AndroidAndroid Widget The number of bits per pixel is always equal to 0.
  • If an error occurs, the following string is returned:
    "BAD" + TAB + TAB + TAB
<Image file name>: Character string
  • Name of the image or PDF file, including its full or relative path (up to 260 characters). A UNC path can be used.
  • Name of the control bound to an image memo item.
AndroidAndroid Widget The PDF files are not supported.
<Desired information>: Optional Integer constant
AndroidiPhone/iPad Desired information.
ibWithAlphaLayerDetermines whether the image has an alpha channel. If this constant is used, <Result> will correspond to:
  • True if the image has an alpha channel,
  • False otherwise.
ibTransparencyColorDetermines whether the image has a transparent area. If this constant is used, <Result> will correspond to:
  • True if the image has a transparent area,
  • False otherwise.
ibListInfoPages
(Default value)
Gets information on each page of a multi-page image. Each page is separated by a carriage return (CR) character.
The information is returned in the following format:
Width + TAB + Height + TAB + Bits per pixel
where:
  • Width: Width in pixels.
  • Height: Height in pixels.
  • Bits per pixel: Number of bits per pixel:
    • 1 (monochrome image)
    • 4 (16-color palette)
    • 8 (256-color palette)
    • 24 (no palette, 16 millions of colors)
    • 32 (no palette, true color)
AndroidAndroid Widget The number of bits per pixel is always equal to 0.
Remarks

Miscellaneous

  • BitmapInfo can be used with PDF files.
    Note: the GDI + framework must be installed on the computer..
    AndroidAndroid Widget This feature is not available.
  • For WMF or EMF images, <Bits/pixel> is equal to 0.
  • The following image file formats are supported:
    • AndroidAndroid Widget JPEG, PNG, GIF or BMP.
Business / UI classification: Neutral code
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/30/2025

Send a report | Local help