我使用CImg读取.png文件,如下所示:
// DGT.cpp : Defines the entry point for the console application.
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include "..\CImg\CImg.h"
using namespace std;
using namespace cimg_library;
long ReadImage(char *fileName)
{
CImg<unsigned char> image(fileName); // stackover flow exceptions thrown here.
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
ReadImage("D:\\Projects\\DGT\\DGT\\shepplogan256.png");
return 0;
}但是,当试图加载映像时,堆栈溢出的异常将抛出到CImg<unsigned char> image(fileName);。图像在那里,所以我想知道我在哪里搞砸了,以及如何读取图像?
https://stackoverflow.com/questions/26046581
复制相似问题