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 / Invert Image Colors

Author
Message
TheCyborg
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 25th Jun 2003 23:31
Today I didn't really have anything to do. So I decided to do something in DBP...

I came up with this code. It can take an image of any format (Wich DBPs Load Image command supports) and convert every pixel into the opposite color. When the conversion has finished the image is shown to the user. Everything is done through memblocks so even a slow computer should do this pretty fast.

Testet on:
400 MHz AMD K6-2
64MB SD RAM
8MB Shared (VERY OLD) Trident-something

A test with a JPG image of the dimensions, 1024x768 24b, on this test machine, the conversion took about 5-10 secs.


NOTE: Used DBPro P4. Not tested with DBC.
http://thecyborg.sytes.net/imgs/logob.jpg[/img]
Not up yet --> http://thecyborg.sytes.net/

Login to post a reply

Server time is: 2024-11-24 02:36:30
Your offset time is: 2024-11-24 02:36:30