Problem with ImageMagick C++ use.

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mongoose54

Problem with ImageMagick C++ use.

Post by mongoose54 »

I have installed ImageMagick C++ into my computer because I am using it with my program. Though I have included all the necessary paths and headers it crashes.

Here is the part of the code:

Image intermediate;

int no=intermediate.totalColors();

intermediate.read("C:\FRAME.bmp");

The variable no is 0, which is normal, since intermediate is empty yet.
It crashes at the last line when it tries to read the image. The image exists. If the installation of ImageMagick failed, it woudn't work at all. At least that's what I guess.

Do you know what might go wrong? I have Windows Vista and VS2008.

Thank you for your help!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Problem with ImageMagick C++ use.

Post by magick »

Go to C:\Program Files\ImageMagick-6.4.5-Q16\Magick_Demos (or something similar to that) and click on the button workspace. Build and run. Assuming it runs without complaint, use the button project as a template for your own application.
Post Reply