主题:[讨论](qbasic)关于put命令放图片的问题
这个方法可以让烦人的bload/bsave离的远远的.
Example:
保存图片(16*16):
open "data.dat" for output as #1
for i = 1 to 16
for j = 1 to 16
write #1,bmp(i,j)
next
next
close #1
取出图片:
dim bmp2(129) as integer
dim u as long
open "data.dat" for input as #1
for i = 1 to 128
input #1,x,y
u = x + 255 * y
bmp2(i + 1)=u
next i
bmp2(0)=128
bmp2(1)=16
put(1,1),bmp2,pset
在第一个程序里的数组bmp保存的是一个256色的位图.
让bload/bsave见鬼去吧!
Example:
保存图片(16*16):
open "data.dat" for output as #1
for i = 1 to 16
for j = 1 to 16
write #1,bmp(i,j)
next
next
close #1
取出图片:
dim bmp2(129) as integer
dim u as long
open "data.dat" for input as #1
for i = 1 to 128
input #1,x,y
u = x + 255 * y
bmp2(i + 1)=u
next i
bmp2(0)=128
bmp2(1)=16
put(1,1),bmp2,pset
在第一个程序里的数组bmp保存的是一个256色的位图.
让bload/bsave见鬼去吧!