I'm getting stack overflow error when I'm trying to read jpg file using Cimg
library while other format bmp is working file .
How can i resolve it?
#include"CImg.h"
#include<stdio.h>
using namespace cimg_library;
int main()
{
CImg<unsigned char> src("d:\\sidimg.jpg");
int width = src.width();
int height = src.height();
unsigned char* ptr = src.data(0,0);
int count=0;
while(count!= width*height)
{
printf("%d",*ptr);
ptr++;
count++;
}
}