Why are TARGA's more useful than .JPG/BMP?
NeHe''s targa loader doesn''t work with a few of the targa setups, (I think the one that can read compressed doesnt handel the alpha channel right). There are plenty of good ones around the net, or you can check out the one at gametutorials.com
code your own loader. actually u just have to do some basic additions to the nehe tga code. its not that hard at all and at wotsite.org or how it was called are the filespecs . good luck
PNG is really too flexible of a format for a lone (hobby) programmer to deal with unless they use a really good library.
______________________________________________________________
The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ
MySite
______________________________________________________________
______________________________________________________________
The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ
MySite
______________________________________________________________
quote:Original post by Thunder_Hawk
PNG is really too flexible of a format for a lone (hobby) programmer to deal with unless they use a really good library.
<small><font color="00FF00">______________________________________________________________
The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ
<a href="http://snow.prohosting.com/~rico13/">MySite</a>
______________________________________________________________</font></small>
Um... The official libpng is Free software and is easy to use:
http://libpng.org/pub/png/libpng.html
Also, for something even easier, Free Image library makes it super easy to load dozens of file formats:
http://freeimage.sourceforge.net/
It''s a mistake to use TGA just because you think that they are eaiser to load. PNG have much smaller file sizes(with the same quality - PNG is lossless), and also, using an existing library will get you up and going much faster then coding and debugging your own TGA loader.
TGAs have an alpha channel (as already mentioned) which is invaluble for at-all-serious graphics work.
In addition, they support run-length encoding, which is very efficient on images that have long stretches of one color (for example, many paletted images and often images with a color key).
BMPs in theory support RLE but it is rarely used, so they tend to be very large. That and they don''t support alpha channel.
JPGs don''t support alpha channel either AND they are "lossy" (ie. you lose some of the information in the compression).
PNGs are fantastic, but the format is about 100x more complex than TGA, so I wouldn''t try writing your own...
Either way D3DX supports all of the above with no work from you AFAIK, so I''d go with PNGs if you can, and otherwise TGAs.
In addition, they support run-length encoding, which is very efficient on images that have long stretches of one color (for example, many paletted images and often images with a color key).
BMPs in theory support RLE but it is rarely used, so they tend to be very large. That and they don''t support alpha channel.
JPGs don''t support alpha channel either AND they are "lossy" (ie. you lose some of the information in the compression).
PNGs are fantastic, but the format is about 100x more complex than TGA, so I wouldn''t try writing your own...
Either way D3DX supports all of the above with no work from you AFAIK, so I''d go with PNGs if you can, and otherwise TGAs.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement