🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #12375

Color compression routines (4096 to 256) wanted.

#12375
From: Raz- Berry
Date: Wed, 26 Apr 1989 01:08
27 lines
1695 bytes
  Calling all GRAPHICS GURU's. I am in the process of adding the 
 ability of doing HAM pics' to iff2sun. Unfortunately I have very
 little idea on how to compress a color map. I need a basic flowchart
 on taking a 4096 color palette and converting it down to
 256. Initially I was thinking that:

 1) Sort the file by pixel color (emulating HAM mode of course).
    eg. how many reds? how many purples? how many puke greens?
 2) take the largest number of pixels per color, and assign them their
    very own color register (up to 256).
 3) take any remaining colors (if we have exceeded the 256 available colors)
    and perform the 'best fit' with the current palette.

  Assuming for the moment that this is the correct way to go, could some
 kind soul clue me in to the appropiate 'best fit' for a palette 
 algorithim?

  I am not real fond of the approach I have described above. If you have a
 better method PLEASE let me know.

  Ideas appreciated. I'll even consider a graphics reference book if you
 know of one.
-- 
Steve -Raz- Berry      Disclaimer: I didn't do nutin!
UUCP: sun!kilowatt!raz                    ARPA: raz%kilowatt.EBay@sun.com
"Fate, it protects little children, old women, and ships named Enterprize"
Technical Details
Message-ID: <33747@kilowatt.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdcad!sun!kilowatt!raz

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdcad!sun!kilowatt!raz
From: raz@kilowatt.uucp (Raz- Berry)
Newsgroups: comp.sys.amiga.tech
Subject: Color compression routines (4096 to 256) wanted.
Summary: HAM to 256 color routine for iff2sun needed...
Keywords: HAM, 256 color, Amiga, Sun
Message-ID: <33747@kilowatt.uucp>
Date: 26 Apr 89 01:08:03 GMT
Organization: Sun Microsystems, Inc. - Mtn View, CA
Lines: 26