home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.graphics
- Path: sparky!uunet!mcsun!Germany.EU.net!mpifr-bonn.mpg.de!specklec.mpifr-bonn.mpg.de!mlelstv
- From: mlelstv@specklec.mpifr-bonn.mpg.de (Michael van Elst)
- Subject: Re: color map. search
- Message-ID: <1992Sep3.091837.12281@mpifr-bonn.mpg.de>
- Sender: news@mpifr-bonn.mpg.de
- Nntp-Posting-Host: specklec
- Organization: Max-Planck-Institut f"ur Radioastronomie
- References: <6yjnh0g.benoit@netcom.com> <34826@cbmvax.commodore.com>
- Date: Thu, 3 Sep 1992 09:18:37 GMT
- Lines: 19
-
- In <34826@cbmvax.commodore.com> chrisg@cbmvax.commodore.com (Chris Green) writes:
- > What I do is create a (for instance) 4096 entry table, each entry of
- >which contains a list of colors, indexed by the upper 4 bits of RGB, and an
- >error value. Since I am going to be using the table for each pixel, I can
- >afford a bit of setup time.
-
- Nice example. When I needed this solution I used a brute force method.
- Most pictures have only some ten thousand different colors (but some
- hundred thousand pixels). A simple 80000-entry hashing table made
- repeated determination of the 'best' color much faster. In fact, the
- overhead of Ghostscript (I wrote a driver for a fixed palette display)
- was now much higher than the color search.
-
- Regards,
- --
- Michael van Elst
- UUCP: universe!local-cluster!milky-way!sol!earth!uunet!unido!mpirbn!p554mve
- Internet: p554mve@mpirbn.mpifr-bonn.mpg.de
- "A potential Snark may lurk in every tree."
-