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.

Code Snippets / Resize Image Function

Author
Message
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 28th Aug 2006 04:25 Edited at: 28th Aug 2006 04:26
Oops, i forgot to mention:
[DBPro and DBC]

This simple function will resize an image to the specified size using sprites. It supports images that are up to 4000x4000 in size (doubt you'd even need one that big) Anyway here's the function (semi-poorly commented):



And here's a example. It will turn a 256x256 image into a 64x64 image:



Hope this comes in handy for somebody Please respond...

Jack LOL
18
Years of Service
User Offline
Joined: 4th Aug 2006
Location: Near the CPU Close to the graphic card
Posted: 29th Aug 2006 11:28
Ok 1 thing:
u dont have to find a free bitmap cuz by logic if a bitmap was created it should be deleted, so it does'nt matter if the bitmap 1 was used before 100 times and deleted 100 times so u can use it again. so it can be lets say bitmap 1.

basicly i dont know what to use it on, cuz if i want to resize an image i'll resize it in a graphics program which does this much better.
just my opinion...

lol?! xD
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 29th Aug 2006 15:39
What if you are making an editor? Then you may use it... And some people may be in mid-editing the bitmap so I thought I'd just put that in there.

Login to post a reply

Server time is: 2024-11-23 03:52:21
Your offset time is: 2024-11-23 03:52:21