heres a function that I use to get image width and height:
Global ImageWidth
Global ImageHeight
Function GetImageDim(image)
` Gets an image's dimensions and puts them in ImageWidth and ImageHeight
m = 1
while memblock exist(m)
inc m
endwhile
make memblock from image m, image
` Heres how it gets dimensions
` *********************************
width = memblock dword(m, 0)
height = memblock dword(m, 4)
` *********************************
delete memblock m
ImageWidth = width
ImageHeight = height
Endfunction
Its real time creation and deletion of memblocks and such, so its not the fastest. For your application you could probably change it and make it faster. The main lines are marked. They get the info from the image data.
"All programmers are playwrites and all computers are lousy actors" -Anon