You could check the extention ?
Else, you could read the file itself and look for the header: BMP starts with BM something, JPG starts with 2 bytes, then JFIF.
file_in$ = Trim$(Lower$(file_in$)) if right$(file_in$, 4) = ".jpg" then print "This is a .jpg"
Else, you could read the file itself and look for the header: BMP starts with BM something, JPG starts with 2 bytes, then JFIF.
ff = ReadFile("c:\_xfiles\grass.bmp") For i = 0 To 10 c = ReadByte(ff) Print Chr$(c) Next CloseFile ff WaitKey() End