> Thanks, go ahead and send it.
Done. Have you received it ?
> Before I start on a game, I need to decide what kind of graphic to use.
> By the way, what is the most popular?
You mean what format ? PPM is very popular in the Unix world, because it is
so simple. However as it is uncompressed, it takes up much space.
In the area of compressed formats, GIF and JPEG are the most popular.
However I do not recommend to use GIF, as it is covered by a patent
held by Unisys, and Unisys is exploiting its rights to an IMHO excessive
degree. Not using GIF might keep you away from courts. It is good for
8 bit deep graphics (up to 256 colors), especially, if they were drawn (not
scanned/captured) and lossless and provides for a transparent color.
JPEG is very nice for 24 bit data, especially natural scenes. However it is
lossy which makes it a bit unsuitable for sprites and such and it doesn't
look too good with drawn images, as it blurrs out sharp edges.
The decoding is pretty complex and best left to a dedicated external Library
like libjpeg.
Most other formats aren't used much. Maybe tiff, which is used for desktop
printing a lot, as it has many many options and carries metadata like
resolution nicely. But again this is a complex beast that should be handled
through external means. Maybe also pcx, but that's not a too good format
either. PNG is what should be used, but it isn't as widespread as it should
be ...
BTW: As long as you can handle PPM, you can handle pretty much every data
format you can imagine by using the ppmtools package.
Due to Unix' capability to run such filter programs transparently on a pipe,
a very minor modification (popen instead of fopen) to my PPM loader will
allow it to load about any file.
CU, ANdy
--
= Andreas Beck | Email : <[EMAIL PROTECTED]> =