#include <iostream>
#include "simplejpegenc.h"
using namespace std;
int main(int argc, char* argv[])
{
if (argc <= 1)
{
cout << "please input bmp filename." << endl;
return 0;
}
string fileName = string(argv[1]);
string outFile = fileName.substr(0,fileName.find_last_of('.'));
outFile = outFile + ".jpg";
JEnc enc;
enc.Invoke(fileName, outFile,100);
cout << outFile << endl;
getchar();
return 0;
}
评论0