Using Visual Studio to build ImageMagick under Windows

Source: Internet
Author: User
Tags imagemagick

Reference:

Http://www.imagemagick.org/script/install-source.php#windows

http://blog.163.com/anteaus_20/blog/static/24422224200811924810941/

"Build Process"

1) According to ImageMagick Installation Guide under Windows, download the source package here (take 6.8.9 as an example), unzip, into the extracted directory.

2) in Visual Studio (take VS2008 as an example), open the Configure.sln in Imagemagick-6.8.9/visualmagick/configure, and if prompted to convert the format, go. Then Build->build solution.

3) Configure.exe will appear in Imagemagick-6.8.9\visualmagick\configure, double-click to run

4) Click "Next"

5) Select "Static multi-threaded DLL Runtime" and then the next step until the end. The VisualStaticMTDLL.sln is generated under Imagemagick-6.8.9\visualmagick.

6) Open VisualStaticMTDLL.sln in Visual Studio and compile the entire solution.

"One compilation Error"

During the compilation, Core_pango the following compilation error:

Solution

All the "newline in constant" error, delete the string of the error line, populate an ASCII string, such as "...", and recompile.

"Build Result"

Eventually, a lot of exe files, LIB, DLL files will be generated under Imagemagick-6.8.9\visualmagick\bin. These include the convert.exeto be used below.

Generate a bunch of. lib files under Imagemagick-6.8.9\visualmagick\lib.

Test

Follow the example in [ImageMagick Learning] Fred's ImageMagick Scripts to C + + Unified solution post for raw_text.jpg to eliminate background noise.

Copy both Convert.exe and raw_text.jpg to a directory, such as d:/ Under this directory, go to the command line and execute the following command

[Plain]View PlainCopy
    1. Convert (Raw_text.jpg-colorspace gray-type grayscale-contrast-stretch 0) (-clone 0-colorspace Gray-negate-lat 25x 25+10%-contrast-stretch 0)-compose copy_opacity-composite-fill "White"-opaque none +matte-deskew 40%-sharpen 0x1 o Ut.jpg

Will get the following out.jpg

Using Visual Studio to build ImageMagick under Windows

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.