GreycLab / CImg

The CImg Library is a small and open-source C++ toolkit for image processing
http://cimg.eu
Other
1.49k stars 285 forks source link

Failed to recognize format of file X #386

Open KyrMitsos opened 1 year ago

KyrMitsos commented 1 year ago

This is a bug, regarding opening a simple jpg and show it on a form automatically. I am trying to run this simple code :

CString path; path.Format("some_path_to_file"); CImg image(path);

Below are the responses I get and image image

Here are the images I am trying to load and show in a form easily:

IMG_0 IMG_1

I also tried code like: CString path; path.Format("some_path_to_file"); CImg visu(500, 400, 8, 3, 0); // and other combinations like 3, 1 or 1, 3 etc visu.load_jpeg(path);

But again no favourable results.

As you will see the images are 24 bit and not 8 bit, however I tried many combinations and also experimented with CImg and CImg with no results.

Thank you for your help.