home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!mcsun!sun4nl!alchemy!jjjbokma
- From: jjjbokma@cs.ruu.nl (John Bokma)
- Subject: Help wanted: 8 pixels to one (PLEASE!!)
- Message-ID: <1992Sep14.113444.21586@cs.ruu.nl>
- Date: Mon, 14 Sep 1992 11:34:44 GMT
- Organization: Utrecht University, Dept. of Computer Science
- Keywords: pixel conversion
- Lines: 34
-
-
- Does anybody know a solution for the following problem:
-
- _ _ _ _ _______
- | | | | | | | I want to convert 8 pixels with an
- |_|_|_|_| ----> | | a.r 1:2 to one big pixel. How do I
- | | | | | | | select the best colour?? (no dithering!)
- |_|_|_|_| |_______| So I need an algorithm to choose the
- best colour out of 8 pixels.
-
- The pixels are 15-bit colour, &0000 = black, &FFFF = white.
-
- I was thinking about calculating distances:
-
- Rw(Ri-Rj)^2+Gw*(Gi-Gj)^2+Bw*(Bi-Bj)^2
-
- Rw,Gw,Bw are wheights
-
-
- And use this to select a colour (I don't know how yet, seems easy for
- grayscale pictures)
-
-
-
- Does anybody know a solution??
-
-
-
-
-
-
- Please Mail: jjjbokma@cs.ruu.nl
-
- Thanks, John
-