home *** CD-ROM | disk | FTP | other *** search
- Path: dispatch.news.demon.net!demon!user
- From: andy@ajdean.demon.co.uk (Andy Dean)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Wanted: Color reduction algorithm.
- Date: Sun, 25 Feb 1996 22:31:30 +0000
- Organization: Private node
- Distribution: world
- Message-ID: <AD5693C296681550C@ajdean.demon.co.uk>
- References: <Ronald.07co@noblehouse.xs4all.nl>
- NNTP-Posting-Host: ajdean.demon.co.uk
- X-NNTP-Posting-Host: ajdean.demon.co.uk
-
- In article <Ronald.07co@noblehouse.xs4all.nl>,
- Ronald@noblehouse.xs4all.nl (Ronald van Eijck) wrote:
-
- >Hi,
- >
- >I'm looking for some source code that can reduce a colormap
- >from x entries to y entries eliminating colors that are
- >closest together. I'll probably need to be able to lock a
- >number of colours that are used in cycles etc. but If I got
- >the basic algorithm I can add that myself. I do not want
- >to use the 3.0 obtainbestpen etc functions because these do
- >not deal with whole colormaps at a time and I doubt that if
- >I do an obtainbestpen for every colour that I'll get very
- >good results.
-
- The most popular algorithm is the "Heckbert Median Cut" algorithm
- which gives good results for most cases. The Independant JPEG
- Group code which is available on Aminet as:
-
- gfx/conv/jpegV6src.lha
-
- contains a very fast and high quality version of the algorithm.
-
- You do not say whether your source colourmap belongs to an
- image, in which case the number of pixels using each particular
- colour will influence the best choice of colours for the
- destination colourmap. Either way, the IJG algorithm can be
- used easily.
-
-
-