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 / [DBP] Resize Image Function

Author
Message
N3wton
14
Years of Service
User Offline
Joined: 3rd Jun 2009
Location: Leeds, UK
Posted: 22nd Aug 2009 03:18 Edited at: 28th Oct 2009 19:45
Working on an editor and need a function that resixed an image to be used as a thumbnail, so I wrote this...



It can only be used for scaling object down
e.g.
taking an image of 256x256 can only be resized to a smaller size, such as 128x128

See it in action

Just made a new one, takes about 20ms to resize, and it can scale up and down



Yours
N3wton

Attachments

Login to view attachments
sladeiw
14
Years of Service
User Offline
Joined: 16th May 2009
Location: UK
Posted: 22nd Aug 2009 23:19
You can use the "bitmap copy" command to scale between source and destination bitmaps.
N3wton
14
Years of Service
User Offline
Joined: 3rd Jun 2009
Location: Leeds, UK
Posted: 22nd Aug 2009 23:24
Yer i was just looking into them looks like it could be allot quicker to do that aswell... though this method can easily be modified to compare images, which could be useful for stuff like voice recognition?

yours
n3wton

Login to post a reply

Server time is: 2024-05-05 03:41:59
Your offset time is: 2024-05-05 03:41:59