PythonMagick fails to build

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
chris2553
Posts: 1
Joined: 2014-01-22T03:37:56-07:00
Authentication code: 6789

PythonMagick fails to build

Post by chris2553 »

After updating to ImageMagick-6.8.8-2, I needed to rebuild PythonMagick (v0.9.9), but found that it would not compile. The reason seems to be that additional compare methods were added recently and the compiler was unable to pick which one to use. I'm not by any means a c++ programmer, but by inspecting other code in _Image.cpp, I managed to hack a patch that means the compile succeeds. Whether the patch is correct is another matter, but I thought I'd submit it for consideration.

Code: Select all

--- PythonMagick-0.9.9/pythonmagick_src/_Image.cpp.orig 2014-01-22 08:13:32.531953469 +0000
+++ PythonMagick-0.9.9/pythonmagick_src/_Image.cpp      2014-01-22 08:42:30.755884723 +0000
@@ -93,7 +93,7 @@ void Export_pyste_src_Image()
         .def("colorize", (void (Magick::Image::*)(const unsigned int, const unsigned int, const unsigned int, const Magick::Color&) )&Magick::Image::colorize)
         .def("colorize", (void (Magick::Image::*)(const unsigned int, const Magick::Color&) )&Magick::Image::colorize)
         .def("comment", (void (Magick::Image::*)(const std::string&) )&Magick::Image::comment)
-        .def("compare", &Magick::Image::compare)
+        .def("compare", (bool (Magick::Image::*)(const Magick::Image&) )&Magick::Image::compare)
         .def("composite", (void (Magick::Image::*)(const Magick::Image&, const ::ssize_t, const ::ssize_t, const MagickCore::CompositeOperator) )&Magick::Image::composite, Magick_Image_composite_overloads_3_4())
         .def("composite", (void (Magick::Image::*)(const Magick::Image&, const Magick::Geometry&, const MagickCore::CompositeOperator) )&Magick::Image::composite, Magick_Image_composite_overloads_2_3())
         .def("composite", (void (Magick::Image::*)(const Magick::Image&, const MagickCore::GravityType, const MagickCore::CompositeOperator) )&Magick::Image::composite, Magick_Image_composite_overloads_2_3())
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: PythonMagick fails to build

Post by magick »

Thanks for the patch. We'll get it into the next point release of PythonMagick.
Post Reply