By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,476 Members | 889 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,476 IT Pros & Developers. It's quick & easy.

Using bitmaps

P: n/a
Hello,

I'm needing some advice: I have an app for which I've built a timer out of
multiple bitmaps--a clock with a moving hands. I've saved each hand
position (1 second, 2 seconds, etc.) as a separate bitmap, and I make the
clock "tic" down by changing the image of a picture box. The problem, of
course, is that the application uses tons of memory, because each of the
bitmaps is preloaded into an array. Is there an easier way to do this, or a
way to cut down on memory usage?

Thanks in advance,
Nathan
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Why not rotate one image around the center?

Is this image something special--more than just drawing lines for the
hands?? If not drawing lines would be the best.. To see how, Microsoft does
have a clock demo for VB.NET that is super and shows the trig needed for
calculating the coords for the line as it moves around....

HTH

Shane

"Nathan" <nk*********************@softhome.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I'm needing some advice: I have an app for which I've built a timer out of multiple bitmaps--a clock with a moving hands. I've saved each hand
position (1 second, 2 seconds, etc.) as a separate bitmap, and I make the
clock "tic" down by changing the image of a picture box. The problem, of
course, is that the application uses tons of memory, because each of the
bitmaps is preloaded into an array. Is there an easier way to do this, or a way to cut down on memory usage?

Thanks in advance,
Nathan

Nov 20 '05 #2

P: n/a
One more thought....
how big are the bitmaps?
How big do you plan on showing your clock.

Be sure that your bitmap is no larger than you will ever need.
for example don't load an 800x600 picture into the bitmap and use drawimage
to draw it scaled down...
just make the original as small as possible and load it.

For a small clock I can't see it taking much memory for some hands at all
positions anyway... but seems rotation would be a better mehod.

My 2 cents worth..

Shane
"Nathan" <nk*********************@softhome.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I'm needing some advice: I have an app for which I've built a timer out of multiple bitmaps--a clock with a moving hands. I've saved each hand
position (1 second, 2 seconds, etc.) as a separate bitmap, and I make the
clock "tic" down by changing the image of a picture box. The problem, of
course, is that the application uses tons of memory, because each of the
bitmaps is preloaded into an array. Is there an easier way to do this, or a way to cut down on memory usage?

Thanks in advance,
Nathan

Nov 20 '05 #3

P: n/a
Thanks for your two cents. No, I'm not using bigger bmps than I need, and
I've given a thought to drawing lines -- I'm just better at drawing with
Adobe Illustrator than I am with VB code. I'll look for the clock demo.
"SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
One more thought....
how big are the bitmaps?
How big do you plan on showing your clock.

Be sure that your bitmap is no larger than you will ever need.
for example don't load an 800x600 picture into the bitmap and use drawimage to draw it scaled down...
just make the original as small as possible and load it.

For a small clock I can't see it taking much memory for some hands at all
positions anyway... but seems rotation would be a better mehod.

My 2 cents worth..

Shane
"Nathan" <nk*********************@softhome.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I'm needing some advice: I have an app for which I've built a timer out of
multiple bitmaps--a clock with a moving hands. I've saved each hand
position (1 second, 2 seconds, etc.) as a separate bitmap, and I make the clock "tic" down by changing the image of a picture box. The problem, of course, is that the application uses tons of memory, because each of the
bitmaps is preloaded into an array. Is there an easier way to do this,

or a
way to cut down on memory usage?

Thanks in advance,
Nathan


Nov 20 '05 #4

P: n/a
Thanks for your two cents. No, I'm not using bigger bmps than I need, and
I've given a thought to drawing lines -- I'm just better at drawing with
Adobe Illustrator than I am with VB code. I'll look for the clock demo.
"SStory" <Th*******@TAKEOUTTHISSPAMBUSTERsofthome.net> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
One more thought....
how big are the bitmaps?
How big do you plan on showing your clock.

Be sure that your bitmap is no larger than you will ever need.
for example don't load an 800x600 picture into the bitmap and use drawimage to draw it scaled down...
just make the original as small as possible and load it.

For a small clock I can't see it taking much memory for some hands at all
positions anyway... but seems rotation would be a better mehod.

My 2 cents worth..

Shane
"Nathan" <nk*********************@softhome.net> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

I'm needing some advice: I have an app for which I've built a timer out of
multiple bitmaps--a clock with a moving hands. I've saved each hand
position (1 second, 2 seconds, etc.) as a separate bitmap, and I make the clock "tic" down by changing the image of a picture box. The problem, of course, is that the application uses tons of memory, because each of the
bitmaps is preloaded into an array. Is there an easier way to do this,

or a
way to cut down on memory usage?

Thanks in advance,
Nathan


Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.