Files
megasource/libs/DevIL-1.7.8/examples/cpp_wrapper_example/il_wrap.cpp
T
2013-09-26 00:20:08 +02:00

24 lines
379 B
C++

#include <IL/devil_cpp_wrapper.hpp>
#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
if (argc < 2) {
cout << "Please specify a filename." << endl;
return 1;
}
ilImage Image(argv[1]);
cout << Image.Width() << 'x' << Image.Height() << '@' << (ILuint)Image.Bpp() << endl;
ilEnable(IL_FILE_OVERWRITE);
Image.Save("test.tga");
return 0;
}