Jump to content
  • Advertisement
Sign in to follow this  
Chon-Ji

Loading .TGA images

This topic is 4857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! Is it possible to load other image format besides .bmp? I need to use .gif, .tga or any of those formats that can be transparent. thanks [Edited by - Chon-Ji on November 26, 2005 7:39:48 AM]

Share this post


Link to post
Share on other sites
Advertisement
Yep there sure is, have a look at lesson 33 for Targas. If you want to load other formats such as gif and png then have a look at the Wotsit website for the file specification.

There are libraries, such as DevIL, that can do the grunt work for you but I don't have any experience with those so I shall let somebody else comment on them.

Hope that helps.

Share this post


Link to post
Share on other sites
Don't use that lesson to learn how to load TGA's, it's horrible.

Grab the specification from Wotsit.org instead, and use that to construct your own loader. You'll learn much more, and it'll be much more standards compliant.

Share this post


Link to post
Share on other sites
the OpenGL Texture Manager Example supports tga, bmp & pcx. Handles colour-mapped and RLE compressed tga's....

You might want to use devil though. It's pretty damn good. Trying to write your own png, jpg or tiff loader requires more ability and time than most people have ;) There are seperate libs available to load and save those formats, however if you use devil, you get all of those wrapped up in a single easy to use interface.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!