Http://www.cnblogs.com/hicjiajia/archive/2011/01/26/1945666.html
ImageMagick is a good stuff. It is very famous. I will not introduce it here. I am looking for developer information on the internet today. Unfortunately, there is little information on the Internet, later, I finally found an article. Window
XP SP3 + vc2010 + imagemagick6.6.7-q16.
1. Download
Http://www.imagemagick.org/script/download.php open the web page after selecting an FTP/HTTP download point, directly download it. What I got is: ImageMagick-6.6.7-2-Q16-windows-dll
Version
Ii. Installation
This screen is displayed during installation:
Select the first four items (the fourth item provides support for developers ).
3. DIY
After installation to the ImageMagick-6.3.7-Q16 \ magick ++ _ demo open magick ++ _ demo. DSW file. If you are using a version later than vc6, you will be prompted to convert the format and select "Yes to all ". Then Vs will automatically convert and open the project file,
Right-click the button project-> compile, soon succeeded, to the ImageMagick-6.3.7-Q16 \ magick++_demo directory will output a button.exe file, we double-click to run it, will generate a button_out.miff file in the current directory, double click button_out.miff File, view results
We have compiled and run the first example in this step, but this example is well prepared. Next we will create an example for ourselves and create a console application project, you can copy the button directly instead of writing the code yourself. in the CPP example, remember to add the # include "stdafx. H ".
Open "toos-> options", expand "projects and Solutions" in the displayed dialog box, and select "VC ++ directories ",
Here, I want to explain that I installed VC ++ 2010 in the window.
Professional Edition, but the "VC ++ directories" item is blank after it is opened,
It may be a problem with my compiler version. We will talk about this situation at the end of the article.
Select "inculde Files" and click the button to add a row, as shown below:
Click Browse on the right to add the include directory provided by imagemagic, my is c: \ Program Files \ ImageMagick-6.3.7-Q16 \ include, after adding
Don't worry, you also need to add Lib, select library files,
Similarly, add the Lib path, for example, my is: C: \ Program Files \ ImageMagick-6.3.7-Q16 \ Lib.
Next, set the project. Select "XXX properties" at the bottom of the "project" menu, select "configuration properties-> linker-> input", and select "additional dependencies" on the right ", click the Browse button to copy the corresponding settings of the built-in button example,
The main significance of this step is to tell the connector to link the two lib files core_rl_magick _. Lib core_rl_magick ++ _. Lib. Therefore, you only need to paste the two files, and the other files are redundant.
Next we can build it. (You do not need to add the dll path at runtime, because the c: \ Program Files \ ImageMagick-6.3.7-Q16 will be automatically added to the path during installation, you can see it by entering the path under the doscommand. There are many DLL files in this directory, which are required when the program is running .)
In practice, the EXE file is successfully compiled and generated in debug mode, but an error occurs during running:
Later, I compiled it in the release mode. In the release mode, everything went smoothly and there was no problem!
At present, there is still a serious problem, that is, the example of zoom under the ImageMagick-6.3.7-Q16 \ magick ++ _ demo, although compiled, but the run will crash, through debugging found that as long as the file is read, both of them will fail. Both in vc6 and vs2008 are so depressing.
About "VC ++
Directories "directory item is empty:
I am not very familiar with this situation, and many friends on the Internet are the same as me. A temporary solution is to set file inclusion and library inclusion paths for each project separately, right-click the project item-> properties, and then click the above steps to edit it. However, this is troublesome, and each project needs to be DIY once, wait for me to study again ....
In Windows I often use DEV-CPP, but in the compilation process will appear inexplicable errors, in the Internet for a long time also failed to solve, so go to vc2010, could it be because the DEV-CPP is a little out...