cimg display() nothing, but debug messages are right

176 views Asked by At

Env: win7 mingw g++ 4.6.2

The code is very simple.

CImg<int> img("xxx.jpg");
img.display();

I use g++ -o xxxx xxxx.cpp -lgdi32 to compile the program.

The debug messages show the image was read correctly. I mean the values of pixels. But the display window shows nothing.

PS: when I use vs2012, the display() works fine.

Anyone knows why? Thanks.

1

There are 1 answers

0
rbotl On

Solution: Stack overflow error when reading jpeg image using Cimg library

See also examples/use_jpeg_buffer.cpp in CImg examples.