06-09-2006, 10:03 PM
Thanks, I didn't know about that.
Hahahah! In fact, look at the very example in the FBWiki...
http://www.freebasic.net/wiki/wikka.php?...KeyPgField
The example has to do with bmp headers!
Here's the code. It's way slower than bload.
Hahahah! In fact, look at the very example in the FBWiki...
http://www.freebasic.net/wiki/wikka.php?...KeyPgField
The example has to do with bmp headers!
Here's the code. It's way slower than bload.
Code:
type bitmap_header field=1
bfType as ushort
bfsize as uinteger
bfReserved1 as ushort
bfReserved2 as ushort
bfOffBits as uinteger
biSize as uinteger
biWidth as uinteger
biHeight as uinteger
biPlanes as ushort
biBitCount as ushort
biCompression as uinteger
biSizeImage as uinteger
biXPelsPerMeter as uinteger
biYPelsPerMeter as uinteger
biClrUsed as uinteger
biClrImportant as uinteger
end type
type rgb_24bit field=1
b as ubyte
g as ubyte
r as ubyte
end type
dim bmp_header as bitmap_header
open "infile.bmp" for binary as #1
get #1,,bmp_header
redim image((bmp_header.biWidth*bmp_header.biHeight)-1) as rgb_24bit
get #1,,image()
close #1
screenres 320,200,24
for y=(bmp_header.biHeight-1) to 0 step -1
for x=0 to (bmp_header.biWidth-1)
pset (x,y),rgb(image(p).r,image(p).g,image(p).b)
p+=1
next
next
sleep
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
--------------------------------------
Freebasic is like QB, except it doesn't suck.