Mail Archives: djgpp/1997/12/12/23:16:11
From: | gautam AT interlog DOT com (Gautam N. Lad)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Filtering Image Algorithm
|
Date: | Sat, 13 Dec 97 03:31:39 GMT
|
Organization: | InterLog Internet Services
|
Lines: | 23
|
Message-ID: | <66supo$p8j$2@news.interlog.com>
|
NNTP-Posting-Host: | ip220-176.cc.interlog.com
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi,
Can someone tell me how to apply a filter (something like a 5x5 filter) to an
image? I saw a site that shows it, but I don't quite understand it. I just want to
modify a pixel's RGB values, and obtain a resulting RGB value, and draw that
coloured pixel. I have access to 24-BIT video mode, so I don't have to care about
a palette, just do something like this:
putpixel(screen, 2, 4, makecol(r, g, b)); // this is put a pixel on screen at 2,
// 4 with colour returned by
// makecol(r,g,b);
Oh, I'm using DJGPP and Allegro 3.0 (Beta).
Please help!
Bye!
-------------------------------------------------------------
Gautam N. Lad
-------------------------------------------------------------
E-Mail: gautam AT interlog DOT com
Website: http://www.interlog.com/~gautam
POV-Ray Software, Gallery, and Links!
-------------------------------------------------------------
- Raw text -