Pregunta

I just installed cImg, and began to go through some of the example files to get myself oriented. Every program that loads an image from the example folder compiles fine, then hits this error in the Command Window while running:

[instance(0,0,0,0,0000000000,non-shared)] CImg::load(): Failed to open file 'Cimg/lena.pgm'.

I assume that since this is all occurring in the example code, that the problem lies within how I have the path to the image folder set up.

Any ideas as to how to fix this?

¿Fue útil?

Solución

Your problem is probably about the path you are using for the execution of the example code. All CImg examples are located in folder examples/ and some of the examples use image data defined in folder examples/img/. In the examples code, a relative path to those images is used (like CImg<>("img/lena.bmp"), so it means that you must execute your example code in folder examples/ to make it working as expected.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top