Page 1 of 1

PostPosted: Thu Jul 14, 2005 10:47 pm
by Vigon
I'm using the @bmp compiler directive (PDE) to create big fonts.
To draw the bitmaps (Big Fonts) correctly you need the bitmap dimensions (width and Height), usually I take the information during the bitmap edition an put it in an array in my code....
The question is:
Is there a way to take the information directly from the bitmap?
Surely the information is already in the resource.
How can I reach it?
Can the resource id number be used to access the bmp resource content?

Thanks for any help.

Vicente

PostPosted: Mon Jul 18, 2005 12:59 am
by Int21h
Use BmpInfo() in PToolBox.Lib. It is in the docs. It returns the width and height of each bitmap. You can also use GetNumBmps() to find out how many bitmaps there are:

<b>int BmpInfo</b>(int index, pointer width_ptr, pointer height_ptr, pointer depth_ptr, pointer transparency_ptr, pointer compression_ptr)