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.

DarkBASIC Discussion / How do you resize a bitmap?

Author
Message
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 9th Mar 2003 20:47
Can someone tell me how I can resize a bitmap?
xxxpetratxxx
B. R. W
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 10th Mar 2003 01:33
in DB?

if not, just use some image editing program like photoshop or paint shop pro (i think that last one's free)

if you mean in DB, you'll have to store the color value of each pixel in an array, and then you'll have to calculate the colors of the pixels for the resized version
then you create a new bitmap and you draw every pixel in it and save it
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 10th Mar 2003 02:17
lol, thanks..

xxxpetratxxx
B. R. W
heartbone
22
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 10th Mar 2003 04:08
Takes file "bitmap.bmp" and converts it to a 800x600 bitmap.
You'd have to save it from Bitmap #2 to disk using your favorite method.

Create Bitmap 2,800,600
Load Bitmap "bitmap.bmp",1
Copy Bitmap 1,0,0,Bitmap Width(1),Bitmap Height(1),2,0,0,800,600


The more you see, the more you know.
The more you know, the more you see.
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 10th Mar 2003 14:29
aw cool thanks!

xxxpetratxxx
B. R. W
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 12th Mar 2003 00:33
but this will just crop the bitmap, won't it?
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 12th Mar 2003 01:09
no, it doesnt work because the source bitmap is too big

xxxpetratxxx
B. R. W
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 12th Mar 2003 04:28
Dont you have a SINGLE paint proggy?!

Current - RPG: Eternal Destiny
http://www.halbrosproductions.netfirms.com
Dont ask those questions! Read the help files lazy! Oh ya, and Tat has a plugin for that!

Login to post a reply

Server time is: 2025-05-15 19:35:17
Your offset time is: 2025-05-15 19:35:17