微 网 高 通

测试例程:BMP文件格式转换
来源: | 作者:微网高通 | 发布时间: 2025-08-28 | 22 次浏览 | 分享到:

测试例程:BMP文件格式转换

#include <stdio.h>
#include "API-WiMiFile.h"
int main( int argc, char* argv[] )
{                                                                                                                      
   char buffer[0XFF];
   unsigned long dwSize;                                            
   unsigned long dwRetVal;
   // The default input buffer size
   dwSize = sizeof( buffer );
   // Convert the BMP file
   dwRetVal = Convert_BMP_File( "D:BMP1.BMP", buffer, &dwSize );
   // Validate the operation status
   if ( dwRetVal != ERROR_SUCCESS )
   {
      printf( "Convert BMP File Failed,Error Code=0X%08lXrn", dwRetVal );
      return 0X00;
   }
   // The output file name and size
   printf( "Success!rnOutput File=%s,File Name Length=%lurn", buffer, dwSize );
 
   // Exit the main program
   return 0X01;
}

 

点击下载  测试例程:BMP文件格式转换