|
-
Jul 25th, 2003, 05:49 AM
#1
Thread Starter
Fanatic Member
bmp file format [RESOLVED]
OK, my main question is, i have a series of 1's and 0's, and was wondering how to convert them into a black&white .bmp form, so i can view them from Paint or any other picture viewing program.
Thanks
Also, of similar topic, what do you need to create your own midi file? is it just notes & their length, and which instrument plays it? thanks.
Last edited by sql_lall; Jul 27th, 2003 at 02:53 AM.
sql_lall 
-
Jul 25th, 2003, 05:56 AM
#2
Frenzied Member
If you go to
http://www.wotsit.org/
you can find file format descriptions for most things.
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
-
Jul 26th, 2003, 04:41 AM
#3
Thread Starter
Fanatic Member
-
Jul 26th, 2003, 05:05 AM
#4
So Unbanned
Re: creating own bmp
Originally posted by sql_lall
OK, my main question is, i have a series of 1's and 0's, and was wondering how to convert them into a black&white .bmp form, so i can view them from Paint or any other picture viewing program.
Thanks
Also, of similar topic, what do you need to create your own midi file? is it just notes & their length, and which instrument plays it? thanks.
To create the bitmap you could loop through your data, and draw the pixels using SetPixel.
Just need to do something like(tested code):
VB Code:
Private buftxt(32696) As String
'my picture had that many pixels
Dim X As Long, Y As Long
For i = 0 To ubound(buftxt)
Picture1.PSet (X, Y), buftxt(i) * 16777215
X = X + 1
If X > Picture1.ScaleWidth - 1 Then
X = 0
Y = Y + 1
End If
DoEvents
Next
'to fill buftxt with random data:
For X = 0 To 32696
buftxt(X) = Int(Rnd * 2)
Next
Pset was fast enough for me.
Good luck,
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
|