Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to recognize format of file X #386

Open
KyrMitsos opened this issue May 30, 2023 · 0 comments
Open

Failed to recognize format of file X #386

KyrMitsos opened this issue May 30, 2023 · 0 comments

Comments

@KyrMitsos
Copy link

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<uint8_t> 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<uint8_t> 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<uint16_t> and CImg<uint32_t> with no results.

Thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant