From: nwickham@nyx.cs.du.edu (Neal Wickham)
Subject: Re: How does this HAM kludge work?
X-Disclaimer: Nyx is a public access Unix system run by the University
	of Denver for the Denver community.  The University has neither
	control over nor responsibility for the opinions of users.
Reply-To: nwickham@nyx.UUCP (Neal Wickham)
Organization: Nyx, Public Access Unix at U. of Denver Math/CS dept.
Date: Sat, 12 Dec 92 20:44:48 GMT

In article <1992Dec12.172420.8553@usl.edu> das9674@usl.edu (Stephenson Daniel A) writes:

>Would someone please explain to me the trick behind this 'HAM' technique?
>
>Nothing grossly technical, please.  Also, how might this lead to
>the famous 'fringing'?


It is basically some encoding logic.  That is, you put some numbers in
and you get other numbers out (and in this case more numbers out).  This
works for color pictures because colors usually are dependent (in this 
case similar) to nearby colors so the ecoding logic can simply make
more output data than input data by making adjacent pixels similar in
an ecoding scheme.  The problem is when you have extreme color changes.
Then the adjacent pixels are not "really" dependent or similar to each
other but the encoding makes them so and the picture gets distored.  It
fringes or bleeds on sharp vertical lines of certain contrasting colors. 

But this is not as bad as it sounds.  There is software such as in Dpaint 
which will minimize this fringing (not sure how but I think) by chosing
proper base colors used in the encoding scheme.  And, in the first place,
images digitized from film seldom have true sharp edges so that HAM works
great.  Just look at some of the HAM images.  They are a lot better than
256 color images.  HAM certainly does fail with a lot of graphic art,
however, since that often has many vertical edges of sharply contrasting
colors.  256 colors work much better for some graphic art.

But now we have the AGA with 256 color and HAM and a new mode called HAM8
and highier resolution for the HAM modes, which is important.  Fringing
occurs from left to right where it can't make certain sharp edge color 
changes (sometimes it can, it depends on base colors).  It needs a few 
pixels to make the transition.  Well it is easy to see that finging is
less visible when you have 1280 horizonal resolution rather than 320.
And HAM8 has 256 base colors (from the 16 million color pallete I think)
so software can choose base colors to virtually eliminate fringing.  HAM
has only 16 base colors.  I think someone said here on the net that HAM8
could make any color change in only 2 or 3 (can't remember which) pixels
with the right base colors.  This isn't bad even in 640 X xxx resolution. 
I've seen some HAM8s that fringe though, but they were just some I 
converted from JPEG images and I am sure that fringing could have been
sharply reduced with proper software or use of.  :)

In any case, HAM and HAM8 are nice for there small file size and because
they come with even $600 base machines so that all kinds of software will
support and use them.  And they are usable, unlike 24-bit which requires
lots of money, memory, speed, and patients to use. 



                                      NCW
 
Newsgroups: comp.sys.amiga.advocacy,comp.sys.amiga.misc