[comp.sys.amiga.tech] GIF Viewer

jhon@menkar.gsfc.nasa.gov (Jhon Honce) (02/06/90)

I have a number of GIF files that look real nice on my Sun at work, 256
color and all.  But I've only found one PD program that will display
these files on the amiga "hamgif"  This program doesn't seem to display
the same number of colors as on the Sun.  I use "xview" on the Sun to
view these files.  The PD programs "GIFtoTMP/TMPtoIFF" which should
convert these files to IFF just barf and die.

So questions:

1) What is the limit to the number of colors displayed by the amiga
   for given modes? (I think HAM and SHAM should do the trick but if
   I know for sure I wouldn't be asking.)

2) Has anyone had any luck with the GIFtoTMP/TMPtoIFF programs?

3) Is there a better GIF viewer for the Amiga, and if so, do you know
   where I could ftp it from?

4) Where can I read about the different display modes for the Amiga?
   (Then I will be quiet and just read.)


As always thanks for any help you can provide.  Email if you don't
want to post.  

-jhon
 

johnm@spudge.UUCP (John Munsch) (02/08/90)

In article <2758@umbc3.UMBC.EDU> jhon@menkar.gsfc.nasa.gov (Jhon Honce) writes:
>I have a number of GIF files that look real nice on my Sun at work, 256
>color and all.  But I've only found one PD program that will display
>these files on the amiga "hamgif"  This program doesn't seem to display
>the same number of colors as on the Sun.
				[stuff deleted]
>1) What is the limit to the number of colors displayed by the amiga
>   for given modes? (I think HAM and SHAM should do the trick but if
>   I know for sure I wouldn't be asking.)

Under HAM mode you can theoretically show 4096 colors simultaneously (the whole
spectrum the Amiga is capable of producing).  In practice it doesn't usually
work out that way because HAM is kind of kludgy.  You have 16 base colors you 
can use anywhere on the screen but if you want to show a color that isn't in
that basic palette you can do so by specifying that only ONE of its three
components (Red, Green, and Blue) will change with respect to the pixel to its
left.  An example will help.

	Lets say you have a line of black pixels with one red pixel midway
	into it.  If black is in your basic palette but red isn't,  you
	can put black pixels across until you get to the one that you want
	to be red and then just change the red component with respect to
	the pixel to its left.  Yippee!  Everything looks just like you wanted.

	Unfortunately we hit a big stumbling block sometimes.  What happens
	when you have another pixel just to the right of the red pixel that
	is a little bit redder and also a little bit bluer (and that color
	isn't in your basic palette).  There's no way to make that pixel
	come out looking correct.  You can change the red component or the
	blue component to match what you wanted but not both.

	Since this sort of thing usually occurs at the boundaries of objects
	in pictures it frequently ends up looking like there is a strangely
	colored fringe along the right hand side of objects.

SHAM mode is an attempt to fix that problem by having a different basic
palette for each line.  When the basic palette can be optimized on a line
by line basis it is a whole lot easier to pick colors that will eliminate
the need for color fringe.  It still displays the same 4096 colors but the
accuracy with which the colors can match what you want on a pixel by pixel
basis is a lot better.

>2) Has anyone had any luck with the GIFtoTMP/TMPtoIFF programs?

I've used them without problem on everything except very large pictures
(640 x 400 or larger).  On very large pictures the 1.0 versions of the
GIFtoIFF stuff had real problems.  Fortunately version 2.0 just came out
and should be appearing soon on a BBS near you.

>3) Is there a better GIF viewer for the Amiga, and if so, do you know
>   where I could ftp it from?

Ftp...some people just don't know how good they have it :->.

I sometimes use a program called VirtGif.  It really isn't much better about
showing ham pics than Hamgif is but it can show really big ones on a
superbitmap screen so you can scroll around, which is kind of neat.

The best you'll get for displaying GIF pictures is to use the publicly
available GIF to SHAM converters and then show them in SHAM mode.  The
results should be much closer to what you're used to on the SUN.

>4) Where can I read about the different display modes for the Amiga?
>   (Then I will be quiet and just read.)

One way is to purchase the new Amiga Rom Kernal Manual: Libraries and Devices.
It will give you a good view of what the amiga's video can do and its a
must have if you ever intend to program yours.

Hope that answered some questions.

John Munsch

jbickers@actrix.co.nz (John Bickers) (02/10/90)

In article <2758@umbc3.UMBC.EDU> jhon@menkar.gsfc.nasa.gov (Jhon Honce) writes:
> So questions:
> 
> 1) What is the limit to the number of colors displayed by the amiga
>    for given modes? (I think HAM and SHAM should do the trick but if
>    I know for sure I wouldn't be asking.)

    Can get up to 64 colors in lo-res, 16 in hi-res, 4096 in HAM. It is also
    possible to get 4096 colors in any mode using one of these dynamic
    palette changing schemes, but this is limited.

    Dynamic schemes are restricted to the mode's normal color limit for each
    scanline.

    Lo-res 64 colors (HALFBRITE) is limited, in that the top 32 colors are
    directly related to the first 32 (half brightness).

    HAM has a problem (see monthly posting for description of HAM) in that
    the translation from 256 "normal" colors can leave color fringing.

> 2) Has anyone had any luck with the GIFtoTMP/TMPtoIFF programs?

    Doesn't SHam (Sliced HAM, from CAR) use this? SHam is the first dynamic
    scheme I've heard of. It works OK for 320x200 pictures.

> 3) Is there a better GIF viewer for the Amiga, and if so, do you know
>    where I could ftp it from?

    There seem to be a lot. The best for 256 color GIFs I have seen so far is
    a program called HamSharp. Anyhow...

        1. HamSharp: resizes very large pictures automatically. Uses decent
            algorithm for mapping 256 colors to HAM, to give very nice
            results. Maybe even better than SHam, which uses a dynamic scheme.

            Only problem noticed so far is it breaks on corrupt pictures.

        2. VirtGIF: never actually seen this one, but the following is quoted
            from Brett Kessler (to someone else):
   "There's a program out there somewhere called VirtGIF that will take
    any GIF picture and put it on the screen.  If it has to, it uses HAM
    mode, and if it's too big for the screen, it lets you scroll around in
    the picture.  If you want, I can send it to you."
            His email addresses are:
           "E-Mail to: consp11@bingvaxu.cc.binghamton.edu
             or try: consp11@bingsuns.pod.binghamton.edu
                   and to: consp11@bingvaxa.BITNET 
                     or on PeopleLink: B.KESSLER"

        3. Giffy, etc: from Compuserve, along with official "docs" for GIF87a.
            Can't handle 256 color pics, but it does work.

        4. Fig, etc: from me, and the 1st NZAmigaUG. Handles any size picture,
            but doesn't automatically resize... that has to be done with
            supplied utilities, which only do basic resizing. Simple color
            algorithm, so output quality is inferior to HamSharp's.

            Handles corrupt files ok. There is also an associated displayer,
            TDis, that will allow you to scroll around very large pics, and
            optionally to do the 3-pixel thing with the left border to keep
            the HAM OK.

    No doubt there are others. The best I've seen though is HamSharp.

> 4) Where can I read about the different display modes for the Amiga?
>    (Then I will be quiet and just read.)

    Hardware reference manual.

v089pfrb@ubvmsd.cc.buffalo.edu (Jeffrey C Murphy) (12/11/90)

 Not a viewer, but a real good converter.
 Get HamSharp2.0 form abcfd20.nasa.gov (I'm not real sure of the name but I
know that the number is: 128.155.23.64) It cleanly converts GIFs to IFFs and
allows several different options. Unfortunatley:
 1) It seems to convert ALL files to ham (hence the name, I guess :)
    So, if you have a 640x400x16 GIF it goes to a 320x400xHAM instead of
    640x400x16 which would yield a better picture. 
 2) It has a bug: It occasional screws up the compression. (That's the exact
    word that my iff viewer uses 8) You can use the -c switch to turn off the
    compression and everything works fine. However, this bug crashes every
    viewer I have except for SHOW which tells me the compression is screwed up.
 3) Another possible bug: Sometimes, even with the -c option, SHOW tells me
    that it can't load plane0. I don't know how to get around this. Sorry.
    Hey! Wait! Maybe someone else does! Genius! :)

CUL8R Jeff M. v089pfrb@ubvmsd

OH Silly me: HamSharp is in the /incoming/amiga/ drawer.

etxtomp@eos.ericsson.se (Tommy Petersson) (12/15/90)

In article <50312@eerie.acsu.Buffalo.EDU> v089pfrb@ubvmsd.cc.buffalo.edu writes:
-
- Not a viewer, but a real good converter.
- Get HamSharp2.0 form abcfd20.nasa.gov (I'm not real sure of the name but I
-know that the number is: 128.155.23.64) It cleanly converts GIFs to IFFs and
-allows several different options. Unfortunatley:
- 1) It seems to convert ALL files to ham (hence the name, I guess :)
-    So, if you have a 640x400x16 GIF it goes to a 320x400xHAM instead of
-    640x400x16 which would yield a better picture. 
- 2) It has a bug: It occasional screws up the compression. (That's the exact
-    word that my iff viewer uses 8) You can use the -c switch to turn off the
-    compression and everything works fine. However, this bug crashes every
-    viewer I have except for SHOW which tells me the compression is screwed up.
- 3) Another possible bug: Sometimes, even with the -c option, SHOW tells me
-    that it can't load plane0. I don't know how to get around this. Sorry.
-    Hey! Wait! Maybe someone else does! Genius! :)
-
-CUL8R Jeff M. v089pfrb@ubvmsd
-
-OH Silly me: HamSharp is in the /incoming/amiga/ drawer.


Could anyone please email me this program (can't ftp)! I also have
problem with my archive/decompress programs lost in a crash, so
uudecode is the only of those programs left.

Thanks in advance,
Tommy Petersson
etxtomp@eos.ericsson.se