|
-
Jan 12th, 2000, 07:13 PM
#1
Thread Starter
Registered User
What is the fastest way to:
1) Read binary data file to a string buffer
2) Draw that code to picture box?
This is the way I have done it, first the data read and then the drawing:
Seek place, #1
Buffer=input(sizeofbuffer,#1)
For A = 0 to Xsize
For B = 0 to Ysize
Color = RGB(0,asc(mid(Buffer,B*Xsize+A,1)),0
'API call used to draw pixel to the picturebox, can't remember which one
Next B
Next A
-
Jan 12th, 2000, 07:34 PM
#2
PowerPoster
Try this:
-
Dim A As Long, B As Integer, Temp As Byte
Open FileName For Binary As #1
For A = 0 To XSize
For B = 0 To YSize
Get #1, , Temp
SetPixel( hdc, A, B, Temp)
'Or use RGB to draw in green
Next
Next
Close #1
-
------------------
Fox
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|