Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / [DBP] For...next fade bitmap and scaling bitmaps

Author
Message
Ashir
18
Years of Service
User Offline
Joined: 3rd Sep 2006
Location: Caracas, Venezuela
Posted: 4th Sep 2006 01:36
1) I load an image and it show with no problems, but when I try to fade it slowly from 0 to 100 it does nothing.

Is the syntax ok?
It's posible to do this?

2) It's posible to scale bitmaps?, I mean, if I load a 640x480 bitmap can I scaled to 800x600?, How?.

Thanks a lot.
Xenocythe
19
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 4th Sep 2006 03:17
Why are you using bitmap 0? Try bitmap 1.


Trowbee
21
Years of Service
User Offline
Joined: 12th Apr 2003
Location: United Kingdom
Posted: 4th Sep 2006 04:23
Scaling is possible, through sprites
Off the top of my head, something like this should do what you want

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 4th Sep 2006 09:06
Quote: "It's posible to scale bitmaps?, I mean, if I load a 640x480 bitmap can I scaled to 800x600?, How?."


That's very easy and can be done with a single copy bitmap command using all 10 parameters.


Ashir
18
Years of Service
User Offline
Joined: 3rd Sep 2006
Location: Caracas, Venezuela
Posted: 4th Sep 2006 16:43
Yes, it's right Scraggle, I haven't notice this way. Thanks.

What about the fading, why it's not working?
D Ogre
20
Years of Service
User Offline
Joined: 19th Nov 2003
Location:
Posted: 7th Sep 2006 01:37
Because you've loaded the image to the display (bitmap 0), the original bitmap
data will be permanently changed (or in this case lost) by setting the fade value to
zero initially. Like Xenocythe said, load the image into another bitmap buffer (1)
and copy the bitmap to the current display then perform the fade operation. This way
the original image stays intact in memory.



Of course there are other ways you could use to get around back buffering...

Login to post a reply

Server time is: 2024-09-25 07:36:43
Your offset time is: 2024-09-25 07:36:43