Hi,
I am having trouble reading in an image using c++ on unix.
I do:
try{image[0].read("menu.tif");
} catch (exception &error_ ) {
cout<<"Caught exception: " <<error.what() << endl;
}
my program compiles(makes) fine, but when I run it I get the following:
Caught exception: ImageMagick: unable to open image `menu.tif': No such file or directory
terminate called after throwing an instance of 'Magick::ErrorResourceLimit'
what(): ImageMagick: no pixels defined in cache `menu.tif'
Abort
the menu.tif is in the same directory as my .cpp file
any help would be appreciated.
Thanks,
Josh
trouble reading in an image in c++
Re: trouble reading in an image in c++
Dear Josh,
well, the tif file and your executable should be at the same location. Otherwise you have to use an absolute path or your take the arg[]'s from the cmd line.
greetings TeeTanne
well, the tif file and your executable should be at the same location. Otherwise you have to use an absolute path or your take the arg[]'s from the cmd line.
greetings TeeTanne