|
|
|
|
|
- Miscellaneous
- Drawing in PHP
BitmapInfo (Function) In french: InfoBitmap
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.
Syntax
<Result> = ImageInfo(<Image file name> [, <Desired information>])
<Result>: Character string - 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> | Integer | Image 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> | Integer | Image 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 string | 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)
The number of bits per pixel is always 32. |
- If an error occurs, the following string is returned:
<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.
<Desired information>: Optional Integer constant Remarks Miscellaneous - BitmapInfo can be used with PDF files.
Note: the GDI + framework must be installed on the computer..
- For WMF or EMF images, <Bits/pixel> is equal to 0.
- The following image file formats are supported:
All the formats described in fGraphicFilter. JPG, PNG, GIF, BMP. Depending on the version of the GD library, these formats may not be supported.
Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|