#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/videodev.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/timeb.h>
#include <jpeglib.h>
#define JPEG_QUALITY 95 //图片质量
int Bmp2Jpg(const char *bmp_file, const char *jeg_file, const int width, const int height)
{
FILE *fd;
int ret;
unsigned char *data;
long sizeImage;
int depth = 3;
JSAMPROW * row_pointer;
long rgb_index = 0;
int i=0;
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
FILE *outfile;
本内容试读结束,登录后可阅读更多
下载后可阅读完整内容,剩余3页未读,立即下载