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 / Centering a Bitmap

Author
Message
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 23rd Feb 2003 14:40
I've loaded a bitmap straight onto the screen, just by using "Load Bitmaap [filepath", and I was wondering if there was a simple way I could position or center it on the screen rather then it being in the top left corner?

I can't just enlarge the bitmap and put the image in the center because I'm allowing the user to change the display mode. Is there an actual command? Because I didn't see one in the list lol.
"Computers are useless they can only give you answers."
Attreid
21
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 23rd Feb 2003 16:47
I don't think that there's a command to do it, but ....
if you give those coordinates, it should wirk with every display mode



I'm following John, but I'm not john.
Lol, it is funnier in french
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 24th Feb 2003 06:21
Thanks, I wasn't sure if you were able to position bitmaps at all.

Additionaly, I was wondering if you could only load bitmaps? Ie, can you load Gifs or PNG's because Bitmaps take up an awful lot of space.

"Computers are useless they can only give you answers."
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 24th Feb 2003 12:47
Yes you can load PNG, JPEG, TGA, etc. (personally, I always use PNG - they are non-lossy, the most compact format and support alpha channels).

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
KamaKase
21
Years of Service
User Offline
Joined: 29th Oct 2002
Location:
Posted: 24th Feb 2003 23:19
Meh, I use bitmaps. Screw the people with slower computers. Mwa ha ha ha ha ha!!!

Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 25th Feb 2003 07:21
Yeah, I use PNG too for the same reasons, it's Bitmap quality with GIF's size. =)

Thanks for the answers, and last question (I promise), just so I know I'm not doing anything wrong. The code posted above:



Won't work because you can't use Bitmap Commands on an Image and vice versa, right? If this is true, maybe you should create an 'Image Width/Height' command or 'Paste Bitmap'. It doesn't really matter for me because I just manually inserted the dimensions of the Image but others might need it, I guess you could load the picture as both an image and bitmap but that shouldn't be nescessary.

"Computers are useless they can only give you answers."

Login to post a reply

Server time is: 2024-09-19 17:04:42
Your offset time is: 2024-09-19 17:04:42