关于读取BMP文件的一个问题!(高手进)
我想读取一幅BMP文件。以前是用VC做的。
可以得到BMP文件每个字节的数据。
下面的程序原来是读取.TXT文件用的。我把文件名改成响应的BMP文件名,不知道为什么不好用了。
请帮助。先谢谢!
Dim filenum As Integer
Dim fileContents As String
Dim fileInfo() As String
Dim i As Integer
Dim strSourceFile As String
Dim str1() As Byte
' String
'strSourceFile = "G:\DLL\VB\1.txt"
strSourceFile = "G:\DLL\VB\03_12_25-09_43_06-AAUATJJAWIGC.bmp"
filenum = FreeFile
Open strSourceFile For Binary As #filenum
fileContents = Space(LOF(filenum))
Get #filenum, , fileContents
Close filenum
str1 = Split(fileContents, vbCrLf)
MsgBox str1(0)