Sorry for the delay. Found it eventually!
The code below opens a bmp file (just alter the filename), then loads the pixel data into an array which has been dimensioned to the size of the image.
After it has loaded, it tells you the width, height and colour depth of the image and waits for you to press a key.
When you do, it creates the image on screen from the data in the array.
My guess is that you don't need that anyway as you seemed to only want to know the number of lines in an image already on the hard disk and this will tell you that without actually displaying it...
Sync On: Sync Rate 0
CLS 0
Open to read 1,"Test.bmp": Rem Colour Image
Read word 1,Discard: Rem Identifier
Read long 1,Discard: Rem File Size
Read long 1,Discard: Rem Reserved
Read long 1,Discard: Rem Bitmap Data Offset
Read long 1,Discard: Rem Bitmap Header Size
Read long 1,ImageWidth: Rem Width
Read long 1,ImageHeight: Rem Height
Read word 1,Discard: Rem Planes
Read word 1,bitsperpixel: Rem Bits Per Pixel
Read long 1,Discard: Rem Compression
Read long 1,bmpdatasize: Rem Bitmap Data Size
Read long 1,Discard: Rem HResolution
Read long 1,Discard: Rem VResolution
Read long 1,Discard: Rem Colors
Read long 1,Discard: Rem Important Colors
Rem Dim an array using the image width and height values
Dim ImageArray(ImageWidth,ImageHeight,2)
Rem Read in the pixel data into the array
For By = ImageHeight-1 to 0 step-1
For Bx=0 to ImageWidth-1
read byte 1,Blue
read byte 1,Green
read byte 1,Red
ImageArray(Bx,By,0) = Red
ImageArray(Bx,By,1) = Green
ImageArray(Bx,By,2) = Blue
Next Bx
Next By
Close File 1
Rem Print values to the screen
Print "Width Of This Image: ";ImageWidth
Print "Height Of This Image: ";ImageHeight
Print "Bits Per Pixel: "; bitsperpixel
Print
Print "Press a key to display image"
Wait Key
Rem Create the image on screen from the data in the array
For By = 0 To ImageHeight-1
For Bx=0 to ImageWidth-1
Ink RGB(ImageArray(Bx,By,0),ImageArray(Bx,By,1),ImageArray(Bx,By,2)),0
Dot Bx,By
Next Bx
Next By
Sync
TDK_Man