WinXDraw_GetImageInfo (hImage, @w, @h, @pBits)
Retreives basic information about an image
Parameter | Description |
---|---|
hImage | The handle to an image |
w | A variable to contain the width of the image |
h | A variable to contain the height of the image |
pBits | A variable to contain a pointer to the bits of an image |
$$TRUE on success or $$FALSE on fail. The w, h and pBits parameters are unchanged if the function fails
The pBits parameter can be used to access the image bits directly. All WinX images have 32 bits per pixel. Each pixel contains 4 bytes, blue, green, red and alpha in that order. The pixels are arrange in rows or scanlines with the bottom scanline of the image first and the top scanline last. This reverse order is due to the way Windows stores bitmaps.
'get basic image info WinXDraw_GetImageInfo (hImage, @w, @h, @pBits) PRINT "The image is ";w;" pixels wide and ";h;" pixels high" |