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.
  • WINDEVJavaUser code (UMC) area of transparency.
  • WINDEVJavaUser code (UMC) alpha channel.
Java The PDF files are not supported.
Linux Caution: In Linux, this function requires a specific configuration. For more details, see Drawing in WINDEV, WEBDEV and WINDEV Mobile.
Example
WINDEVJavaUser code (UMC)
Info_Image, Format are strings
Hauteur, Largeur are int
// Récupération des caractéristiques de l'image
Info_Image = InfoBitmap("C:\Windows\CARREAU.BMP")
Format = ExtractString(Info_Image, 1)
Largeur = Val(ExtractString(Info_Image, 2))
Hauteur = Val(ExtractString(Info_Image, 3))
// Affichage des caractéristiques
Info("Format de l'image : " + Format, "Largeur : " + Largeur, "Hauteur : " + Hauteur)
Syntax
<Result> = ImageInfo(<Image file name> [, <Desired information>])
<Result>: Character string
  • WINDEVJavaUser code (UMC) 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)
    Java The number of bits per pixel is always equal to 0.
    Linux The number of bits per pixel is always 32.
  • 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.
Java The PDF files are not supported.
<Desired information>: Optional Integer constant
WINDEVJavaUser code (UMC) 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)
Java The number of bits per pixel is always equal to 0.
Linux The number of bits per pixel is always 32.
Remarks

Miscellaneous

  • BitmapInfo can be used with PDF files.
    Note: the GDI + framework must be installed on the computer..
    Java This feature is not available.
  • For WMF or EMF images, <Bits/pixel> is equal to 0.
  • The following image file formats are supported:
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