本人使用的环境为VS2019+EasyX,希望快速输出每帧视频。
已经在程序内获得全图的输出像素矩阵,一个一个像素得打印非常慢。换成“输出至BMP文件再用EasyX加载”后帧率仍然不高,求解决方法。
图像存储在如下结构体中:********
struct Pic{
private:
struct Pixel{
unsigned int r,g,b;
};
public:
int bmpWidth;//图像的宽
int bmpHeight;//图像的高
int biBitCount;//图像类型,每像素位数
RGBQUAD *pColorTable;//颜色表指针
vector<vector<Pixel> > Bits;
bool read(char *); // 传入图像的存储路径
bool saveBmp(char *); // 传入图像的存储路径
}P;