?? main.cpp
字號:
#include "StdAfx.h"
#include <fstream>
#include <iostream>
#include "readphoto.h"
#include "JPG.h"
using namespace std;
int main()
{
int nImgWidth, nImgHeight;
unsigned char* img_data= ReadBmpFile("face.bmp", nImgWidth, nImgHeight);
double* img_doulbe_data=new double[nImgWidth*nImgHeight];
for (int i=0;i<nImgHeight*nImgWidth;i++)
{
img_doulbe_data[i]=(double)img_data[i];
// cout<<img_doulbe_data[i]<<" ";
}
delete []img_data;img_data=NULL;
ofstream outFile;
outFile.open("face.jpg",ios::binary);
jpg(img_doulbe_data, nImgHeight, nImgWidth, outFile);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -