Documents and examples of PythonMagick

From what I can tell, PythonMagick wrapps the Magick++ library. I have been able to copy and paste C++ code using this library into python and it works as expected. Plus the names of the classes and member functions match (where as MagickWand seems to be totally different).

    import PythonMagick as Magick
    img = Magick.Image("testIn.jpg")
    img.quality(100) #full compression
    img.magick('PNG')
    img.write("testOut.png")

I could not find them anywhere either but this is how I went about using it anyway.

Example

import PythonMagick
image = PythonMagick.Image("sample_image.jpg")
print image.fileName()
print image.magick()
print image.size().width()
print image.size().height()

With output like this

sample_image.jpg
JPEG
345
229

To find out what image methods are available for example I looked in the cpp source. Taking the Image object binding: Image implemented in _Image.cpp Or better still look at the suggestion for getting the methods contained in another answer by Klaus on this page.

In this file you'll see lines like this

    .def("contrast", &Magick::Image::contrast)
    .def("convolve", &Magick::Image::convolve)
    .def("crop", &Magick::Image::crop)
    .def("cycleColormap", &Magick::Image::cycleColormap)
    .def("despeckle", &Magick::Image::despeckle)

The bit in quotes maps to the function name of the Image object. Following this approach you can figure out enough to be useful. For example Geometry specific methods are in _Geometry.cpp and the include the usual suspects like

     .def("width", (size_t (Magick::Geometry::*)() const)&Magick::Geometry::width)
    .def("height", (void (Magick::Geometry::*)(size_t) )&Magick::Geometry::height)
    .def("height", (size_t (Magick::Geometry::*)() const)&Magick::Geometry::height)
    .def("xOff", (void (Magick::Geometry::*)(ssize_t) )&Magick::Geometry::xOff)
    .def("xOff", (ssize_t (Magick::Geometry::*)() const)&Magick::Geometry::xOff)