ImageMagick API Crashing
Posted: 2012-11-01T10:31:24-07:00
I just downloaded the windows install for ImageMagick 6.8.0 Q16 to see if it will meet my needs for a project i'm working on. ImageMagick is crashing whenever I try to create an image from file, or write an image to file.
Here is my code in it's simplest form:
Magick::InitializeMagick("C:\\Program Files (x86)\\ImageMagick-6.8.0-Q16");
//Magick::Image local_file_image("image.bmp");
Magick::Image local_file_image(Magick::Geometry(200,200), Magick::Color("Cyan"));
local_file_image.write("x.bmp");
If I use the commented line, it crashes there, if I create the image myself, it crashes on the write.
I've opened the button and demo projects, and I can compile them without issues, but they also crash when run. The demo program crashes on line 45 (Image model( srcdir + "model.miff" );).
I've also tried copying all the DLLs into the project's folder, and calling InitializeMagick(""), and got the same result.
Can anyone shed some light on why this is crashing?
EDIT: Just as a side note - I suspect that InitializeMagick isn't succeeding for some reason, I don't see a way to confirm it's success. I tried commenting that line out, and I get the same result, creating the image works, but writing fails, so it would seem to me that I'm not initializing it successfully, but I'm not sure why this might be.
Here is my code in it's simplest form:
Magick::InitializeMagick("C:\\Program Files (x86)\\ImageMagick-6.8.0-Q16");
//Magick::Image local_file_image("image.bmp");
Magick::Image local_file_image(Magick::Geometry(200,200), Magick::Color("Cyan"));
local_file_image.write("x.bmp");
If I use the commented line, it crashes there, if I create the image myself, it crashes on the write.
I've opened the button and demo projects, and I can compile them without issues, but they also crash when run. The demo program crashes on line 45 (Image model( srcdir + "model.miff" );).
I've also tried copying all the DLLs into the project's folder, and calling InitializeMagick(""), and got the same result.
Can anyone shed some light on why this is crashing?
EDIT: Just as a side note - I suspect that InitializeMagick isn't succeeding for some reason, I don't see a way to confirm it's success. I tried commenting that line out, and I get the same result, creating the image works, but writing fails, so it would seem to me that I'm not initializing it successfully, but I'm not sure why this might be.