CompuServe Messages

Image compression

    12-Oct-94 20:55:01
Sb: #128540-Image compression
Fm: Gus Grubba 70673,1605
To: Paul Sanford [LVL5] 75144,2354
No. When a Targa file is compressed, all it happens is that, consecutive, constant (same) colors are stuck together. That means, if the image has a large area with a same color, that information can be saved in a "packet" that contains the color and the repetition count. This works great for computer generated images but doesn't do any good in real life images. In fact, the resulting file might turn out larger than the original if there is nothing to compress. ZIP compression is uses a different method. It scans the file checking for bytes that repeat more often than others and "pack" them. This works great for text data as some characters repeat a lot more often than others. For images, the results are somewhat arbitrary due to the nature of the information (pretty much random). Regardless, you will be better off saving the files as "uncompressed" Targas and "Zipping" them up. ZIP compression is mostly used for real data (such as databases and spreadsheet). It couldn't be lossy otherwise it would run havoc on these files. JPEG, roughly speaking, uses a method of compressing down the number of colors in an image. For real life video, this works fine as it's rare a situation of a smooth gradient running from end to end. On computer images on the other hand, that's pretty common. If the number of colors is reduced, you will begin to notice "steps" as you move up or down the gradient.