Hi i am using cimg to process images in c++ with Xcode, but whenever i try to load an image it fails to do so. I have placed the image in the same directory as the project, and besides that i have even specified the filepath. I have also installed Imagemagick as i am told that cimg needs this to work with jpegs. But a simple piece of code like this:
#include "CImg.h"
#include <stdlib.h>
#include <iostream>
#define cimg_use_magick
#define cimg_use_png
using namespace cimg_library;
using namespace std;
int main()
{
CImg<unsigned char> img("ILTQq.png");
img.display();
}
still fails. So i am thinking that maybe i haven't linked imagemagick properly with xCode, but this code fails even when i try a .png format which to my knowledge is supported by CImg without any additional "help". What should i do?