The Beholder 0 Newbie Poster

I'm having a dilema with bsave, my graphic array is 32x32 pixels in screen mode 7 and I'm using this formula to get the amount of bytes for the DIM statement
bytes= (4 + int(((width)*(bitsperpixel/bitplanes)+7)/8)*bitplanes*height) /2
(4+int((32)*(4/4)+7)/8)*4*32)/2=258

if I use this amount for the dim statement and if I use get, to get the 32x32 pixels and then put them somewhere else it works fine, so 258 works fine. BUT when I Bsave this same array I have to use double that amount + 1, 513 otherwise it won't work. I have searched alot on the internet for more info on this but it seems everyone has a different formula or method to bsave a graphic array, some say its width * height /2 +1, other say its the forumula I used without the /2, so why do I need to double my arraysize for bsave? I can't think why it needs to be double, does anyone know the exact formulas for the array and for bsaving?
its not that my current settings don't work they do, (array=258, bsave length 513) I can't understand why the amount I have work, and why there are so many different opinions on what the correct forumla is.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.