1
\$\begingroup\$

Is there a C++ library that enables reading of .tga and .blp image formats on Windows?

\$\endgroup\$

3 Answers 3

1
\$\begingroup\$

For BLPs, you may check this source code example.

For TGAs, honestly I would just convert them to eg. PNGs offline, and then use plain GDI+ to load the PNGs. Is there a specific reason for using TGA? Anyway, you can use this full, annotated source code.

\$\endgroup\$
3
  • \$\begingroup\$ I have heard TGAs are more compact than PNGs. \$\endgroup\$
    – Oskar
    Commented Jul 10, 2012 at 9:36
  • 1
    \$\begingroup\$ @Oskar this is almost never the case; TGAs are usually not compressed, and when they are they use RLE compression which is one of the most naive forms of compression. On the other hand, the PNG standard allows for many different optimisation and compression schemes that have made it the preferred lossless image format for the web and virtually any other application. \$\endgroup\$ Commented Jul 10, 2012 at 16:10
  • \$\begingroup\$ Thanks, I thought that .blp was more complex. I will se what can I dow with .tga. \$\endgroup\$
    – user629926
    Commented Jul 10, 2012 at 21:58
0
\$\begingroup\$

For Targa (.tga) files, the FreeImage library may be useful.

\$\endgroup\$
0
\$\begingroup\$

I recommend using SOIL. I found it to be by far the easiest way of loading and saving texture to and from OpenGL. The last update was in 2008, though. It still works fine, but some people like to steer away from "old" software.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .