Page 1 of 1

how to use imagemagick?

Posted: 2011-02-07T01:27:20-07:00
by std
i installed imagemagick in visual studio 2008 according to advance instructions.
it's success.
now i open new project and want to connect them.
how can i do that?

In which format I can use to load an existing image?

can you give me a simple working example code to load existing image ?
thanks for your help.

Re: how to use imagemagick?

Posted: 2011-02-07T09:25:58-07:00
by el_supremo
If you are using Magick++ the best way to start is to use the advice "Magick" always gives:
Go to c:\Program Files\ImageMagick-6.6.7-1\Magick++_demos and click on the button project. Build and execute. Now use this project as a template for your own custom code.
If you are using C, then start with logo_1.c in my examples - http://members.shaw.ca/el.supremo/MagickWand/.
To get it to compile you need to modify the properties of your C project.
Right click on the project name and select Properties and then modify the following options:
- In C/C++|General: In "Additional Include Directories" add the path to your include directory - something like "C:\Program Files\ImageMagick-6.6.7-Q16\include"
- In Linker|General: Add the additional library directory C:\Program Files\ImageMagick-6.6.7-Q16\lib
- In Linker|Input: Add the Additional Dependencies CORE_RL_magick_.lib CORE_RL_wand_.lib

Change the pathname to suit your specific installation.
If you're generating a debug version change _RL_ to _DB_ in the above names and if you're using the Q8 version of IM change -Q16 to -Q8.

Pete