il_wrap.cpp
上传用户:wmy0603
上传日期:2022-05-02
资源大小:1808k
文件大小:0k
源码类别:

压缩解压

开发平台:

Visual C++

  1. #define IL_CXX_CODE
  2. #include <IL/devil_cpp_wrapper.hpp>
  3. #include <iostream>
  4. using namespace std;
  5. int main(int argc, char **argv)
  6. {
  7. if (argc < 2) {
  8. cout << "Please specify a filename." << endl;
  9. return 1;
  10. }
  11. ilImage Image(argv[1]);
  12. cout << Image.Width() << 'x' << Image.Height() << '@' << (ILuint)Image.Bpp() << endl;
  13. ilEnable(IL_FILE_OVERWRITE);
  14. Image.Save("test.tga");
  15. return 0;
  16. }