User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Visual Basic 4 / 5 / 6 section within the Software Development category of DaniWeb, a massive community of 455,987 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,781 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums
Views: 1924 | Replies: 0
Reply
Join Date: Aug 2004
Posts: 9
Reputation: The Beholder is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
The Beholder The Beholder is offline Offline
Newbie Poster

Bsaving and cimming graphics

  #1  
Aug 28th, 2004
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.
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Visual Basic 4 / 5 / 6 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum

All times are GMT -4. The time now is 9:31 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC