Xbasic
BITMAP_SIZE Function
Syntax
Dimensions as P = bitmap_size(C filename [,C units ])
Arguments
- filenameCharacter
The name of the Windows Bitmap (.BMP) or JPEG image file to examine.
- unitsCharacter
The unit of measurement. The options are:
- "inches"
- "cm"
- "pixels"
Returns
- DimensionsPointer
Returns a dot variable with the following properties:
- heightNumeric
The image height.
- widthNumeric
The image width.
Description
The BITMAP_SIZE() function returns a dot variable containing the dimensions of an image file. It returns the height and width of a bitmap (as .height and .width properties) . Units are 'inches', 'pixels' or 'cm'.
Example
dim ptr as P ptr = bitmap_size("C:\test2.jpg", "pixels") ? ptr.height = 1024 ? ptr.width = 768
See Also