该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
/*
** 这个程序是读取jpg图像的
** 后续加上jpg图像打开和存放
*/ #include
#include
#include
#include
#include #define SOI 0xD8 //文件头
#define EOI 0xD9 //文件尾
#define APP0 0xE0 //定义交换格式和图像识别信息
#define SOF0 0xC0 //帧开始(标准 JPEG)
#define DQT 0xDB //定义量化表
#define DHT 0xC4 //定义 Huffman 表(霍夫曼表)
#define SOS 0xDA // 扫描行开始
#define DRI 0xDD //定义重新开始间隔
#define COM 0xFE //注释 unsigned short jpgWidth; //图像的宽
unsigned short jpgHeight; //图像的高
unsigned char bitDepth; //图像类型,每像素位数
unsigned short jpgXpelsPerMeter; //水平分辨率
unsigned short jpgYpelsPerMeter; //垂直分辨率
unsigned char SOF_find=0; char readPath[100]; //图像路径
unsigned char CurrentByte; //当前字节
unsigned short CurrentWord; //当前word
unsigned int BytePos; //当前字节的位置 bool readjpg(char *jpgName); //读取