Help: Bload, Bsave, Put, Get 
Author Message
 Help: Bload, Bsave, Put, Get

Can someone tell me how I can load more than one bsaved picture in a
dimensional variable? Any help would be appreciated.


Thu, 14 Jun 2001 03:00:00 GMT  
 Help: Bload, Bsave, Put, Get

Quote:

>Can someone tell me how I can load more than one bsaved picture in a
>dimensional variable? Any help would be appreciated.

It's fairly simple, but there are a few things to look out for.  First,
BSAVE and
BLOAD can unfortunately only be used on arrays of 64K or less, so u can't
use them for arrays which are too big.  It's really no different from an
array
with 1 pic, except that u have to make sure u have the number of bytes to be
saved correct.

a quick eg:
------
DEFINT A-Z
SCREEN 13
CONST PicSize = 202   ' say 20 x 20 each
CONST NumPics = 10
DIM Array(0 to NumPics * PicSize - 1) AS INTEGER

' get pics into array
' eg: to get an image into the 7th slot in the array
PicNum = 7
GET (50, 50)-(69, 69), Array(PicNum * PicSize)

' saving the pics
DEF SEG = VARSEG(Array(0))
BSAVE "File1.dat", VARPTR(Array(0), PicSize * 2 * NumPics

. . . . .

' loading the pics:
DEF SEG = VARSEG(Array(0))
BLOAD "File1.dat", VARPTR(Array(0))

' now the array has the same data in it as when you saved it.
------

-dk



Sat, 16 Jun 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. bsave/bload help!

2. I need help w/BLOAD and BSAVE

3. BSAVE, BLOAD HELP!!!!!!!!!

4. HELP on BLOAD and BSAVE

5. BLOAD BSAVE

6. BSAVE/BLOAD

7. Question: BLOAD and BSAVE

8. BSAVE and BLOAD - compilable??

9. Bload and bsave in screen 12

10. VGA/EGA BLOAD/BSAVE?

11. BLOAD and BSAVE with compressed drives - ???

12. BLOAD/BSAVE Screen 12

 

 
Powered by phpBB® Forum Software