I've seen some bb file files with a load of Data "asdasd" lines in 'em. What are they? One appears to be a gfx file, how do I go about encoding my own?
Thnaks.
Thnaks.
graphics 640,480,32,2 setbuffer backbuffer() img=loadimage("img2convert.bmp") setbuffer imagebuffer(img) w=writefile("datablock.txt") writeline w, "Data "+imagewidth(img) writeline w, "Data "+imageheight(img) lockbuffer for y=0 to imageheight(img)-1 line$="Data " for x=0 to imagewidth(img)-1 rgb=readpixelfast(x,y) and $ffffff line$=line$+"$"+hex$(rgb) if x<imagewidth(img)-1 then line$=line$+"," next writeline w,line$ next unlockbuffer closefile w
restore pic read w read h img=createimage(w,h) setbuffer imagebuffer(img) lockbuffer for j=0 to h-1 for i=0 to w-1 read rgb writepixelfast i,j,rgb next next unlockbuffer ;... .pic include "databock.txt"