Page 1 of 1

Some methods can't be used in Magick++

Posted: 2018-04-10T02:27:54-07:00
by milad
I've installed ImageMagick-7.0.7-Q16 and I'm using Magick++ in my C++ program (using Visual Studio 2015, Release, x64, project is configured to use Magick++).
I was able to use some of the functions like posterize and crop but I had problem with other functions. Some functions like quantizeColors (myImage.quantizeColors(2)) and quality have no effect on images. And I got an error in this code after executing which I don't think should give any errors:

Code: Select all

	Image img(Geometry(800, 800), Color("white"));
	img.font("Helvetica");
	img.fillColor(Color("firebrick"));
	img.strokeColor(Color("red"));
	img.draw(Magick::DrawableText(25, 25, "Some text")); // Error
	img.write("pics/a.png");
I've tried to compile (https://www.imagemagick.org/script/inst ... hp#windows) the program (ImageMagick-7.0.7-28) myself and use the libraries. After compiling it I wasn't able to find the libraries to include it in my project (is it inside the 'VisualMagick' folder?! Magick++? There was no help on how to use Magick++ in a project after compiling it.)

Any help would be appreciated.

Re: Some methods can't be used in Magick++

Posted: 2018-04-10T09:46:38-07:00
by snibgo
milad wrote:And I got an error in this code after executing ...
What is the error message? The code you show compiles and executes with no error for me, with v7.0.7-28.

When reporting errors, please give full details. This should include a complete but minimal program that reproduces the error.

The Windows source builds and runs successfully for me, with the Cygwin toolset. I don't use Visual Studio.