Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!uxc.cso.uiuc.edu!uxc.cso.uiuc.edu!ux1.cso.uiuc.edu!phil From: phil@ux1.cso.uiuc.edu Newsgroups: comp.graphics Subject: Re: GIF viewers are inconsistent Message-ID: <5300017@ux1.cso.uiuc.edu> Date: 21 Jun 89 16:24:00 GMT References: <5300015@ux1.cso.uiuc.edu> Lines: 56 Nf-ID: #R:ux1.cso.uiuc.edu:5300015:ux1.cso.uiuc.edu:5300017:000:3116 Nf-From: ux1.cso.uiuc.edu!phil Jun 21 11:24:00 1989 > True color representation depends on the graphics display card you are > using. GIF allows 256 colors, each one of which can be one of 16.7 million > possible colors. If you are using a CGA, you are limited to 4 colors that > are pre-fixed. How can you possibly do even a reasonable job on a CGA ? I would not be able to, but at that point I'd expect to see that same set of 4 colors (or less) from all viewers that work, although not necessarily assigned to the same original color. > If you are using an EGA, you have 16 colors that can be selected from > a possible set of 64 colors. Better, but far from what is needed for > reasonable color representation. > VGA and SuperVGA 256 colors modes are much better. Though you do not > get the full color resolution that GIF is capable of, you can still > select 256 colors out of 262 thousand colors. You will find that when > you use these modes, the differences between the display programs > disappear. The differences mainly exist because the GIF colors > specifications have to be approximated by what the display card can > show and different programs have different methods. I have standard IBM VGA in a PS/2-30/286. > More specifially, GIF can handle 8 bits of color resolution, meaning > every color can have red, green, and blue values from 0 to 255. But VGA > is only 6 bits, meaning RGB values from 0..63. So to display on VGA, > the GIF program has to scale the 8 bits down to 6 bits which can cause > color distortion and differences in colors depending on exactly how the > program "crunches" 256 values into 64. So, I'd expect the colors to be truncated this way, and therefore still have the same colors displayed on my 256-of-262144 display from a file having 256-of-16777216 colors. The colors are instead DRAMATICALLY different. One viewer shows one area as several over saturated hues of the rainbow and another viewer shows the same thing as a SINGLE ugly green hue. > Different display programs also have different default modes. FASTGIF > displays GIF files in EGA modes but does a good approximation of better modes > using a dithering technique, VGIF uses the VGA modes and I'm unsure > about the others. Check the documentation that comes with these programs to > see what modes they support and then use the one best suited for YOUR > particular hardware configuration (ie FASTGIF for EGA, VGIF for VGA, ...) This indeed seems like what must be happening. Although ALL viewers are squishing the images (360x480) into the left side, some were truncating it on the bottom, indicating the likelyhood of being in the EGA (640x350) mode. The FRACTINT program has a tweaked VGA mode of 360x480x256 with non-square pixels. It works by loading the registers directly instead of calling BIOS to set a graphics mode (limited choices apparently). Documentation says this works only on IBM VGA *REGISTER COMPATIBLES*. I'd like to see a viewer that can use this mode. FRACTINT source is available, so why not. So far, I have NO SOURCE to any viewers, so I can't get in and FIX THEM. --Phil howard--