📄 bmpconvert.cpp
字号:
// This is the main project file for VC++ application project
// generated using an Application Wizard.
#include "stdafx.h"
//#using <mscorlib.dll>
//using namespace System;
extern int bmpInit (void);
//extern int bmpPrint(FILE *);
extern int bmpDecode (FILE *, FILE*);
char filename[256];
char fullname[256];
char outfilename[256];
int _tmain(int argc, char *argv[])
{
FILE *fpi, *fpo;
bmpInit ();
// TODO: Please replace the sample code below with your own.
//Console::WriteLine(S"Hello World");
//printf ("This is using printf\n");
if (argc < 2 )
{
printf ("Usage: bmpconvert bitmapFileName\n");
return 0;
}
strcpy (filename,argv[1]);
filename[0]= toupper (filename[0]);
strcpy (fullname,argv[1]);
strcat (fullname,".bmp");
strcpy (outfilename,argv[1]);
strcat (outfilename,".c");
//printf ("%s %s\n", filename, fullname);
if ( (fpi=fopen(fullname,"r")) == NULL)
{
printf ("***ERROR: File <%s> not found\n", fullname);
return 0;
}
if ( (fpo=fopen(outfilename,"w")) == NULL)
{
printf ("***ERROR: File <%s> not found\n", outfilename);
return 0;
}
bmpDecode (fpi,fpo);
//bmpPrint ();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -