
                             25 July 1997

                         PCX2RAW Documentation


For information on How to use the program, write "PCX2RAW /?"

PCX2RAW v1.00 converts ordinary ZSoft PCX images to RAW data.
The main program is written in Watcom C/C++ v10.5, but the VESA drivers are
written completely in TASM v4.0 because I think it is easier to do such
low-level code in Assembler.

I guess that the only ones who are using RAW images are graphics programmers,
and therefore I don't think I have to explain What a RAW image is.
In future versions I may add support for other input file formats like GIF,
JPG, BMP etc. I chose to support PCX images because it is widely used,
easy to load and supports both 256 and 16.8M color pictures. I didn't add
any support for 16 color images and below below because I don't think
anyone uses them anymore.

I am aware of that it already exists lots of PCX to RAW converters, but
I haven't been able to find any freeware converters with the features
that I need. But now there is one...

The reason to why I wrote this program is a long story...
It began with that I rendered a small animation in 3D Studio that I was
going to use in a sound/gfx setup. I stored the animation in the FLC format
and started reading texts about how to decode FLC animations. I found the
format to be pretty complicated and realized that I was going to spend
many hours on coding a decoding routine, so I decided to find a program
that could convert the animation to a series of images. Finally I got hold
of a FLC to GIF converting program and converted my animation to 90 GIF
pictures. The next problem was that each frame got its own palette and
used all 256 colors. Even if it was possible to convert each image with
for example PaintShop Pro to use only 64 or 128 colors, I found clumsy
to change the palette for every frame...
After a few days of hard thinking I decided to code my own program that
could do everything I needed in only one step. Convert the images to RAW
format, find a common palette for them, and decrease number of colors used
in each picture.
Recently I discovered that 3D Studio is able to save an animation as
a series of BMP images, so now I don't even need the FLC to GIF converter.
Instead I use the great image viewer/converter program "SEA" to convert
the BMP images to PCX images.
I admit that I have spent much more time writing this program, than it
would have taken to code the FLC decoding routine. But now I got a nice
PCX to RAW converter too...

Some drawbacks with PCX2RAW:
1. The color quantization formula that I use is not the best one, so in some
special cases the picture gets strange colors etc. But you can't anyway
expect to much when you are converting lots of pictures to use the same
palette and only 20 colors. For best results the pictures should have
about the same color tone.
2. The converting procedure is rather slow, but I don't see this as a major
drawback because I get time to go and get a Coke when I'm converting images.
3. I do not take any responsibilities for what may happen when you use
this program, even if it is unlikely it may convert your whole hard disk to
a banana.

As I have said before, this program is Freeware, the reason to this is
that I hardly think it is possible to sell it and that I hate Shareware
programs displaying small shareware delays now and then.
But that it is freeware doesn't mean that you aren't allowed to send gifts
to the address below, I would on the contrary gladly appreciate almost
anything you send me. For example money, a postcard, a new hard disk,
cookies etc.  Please send comments or questions to my e-mail address.
            

    Petrik Clarberg             <petrik.clarberg@swipnet.se>
    Sarvgrnd 2D
    S-216 12 MALM
    SWEDEN

                Copyright (c) 1997 by Petrik Clarberg
