I am new to python and PythonMagick, i am not sure if it is ok to post this here but not python or boost's web, but plz have a look, any suggestions will be thankfull
i am writing some image process APIs use PythonMagick, but don't know how to pass this argument in python
see:
from help(PythonMagick)
Code: Select all
| C++ signature:
| annotate(Magick::Image {lvalue},std::string,MagickLib::GravityType) -> void*
from my code i did sth like
img.annotate("some text here",don't know what's the second argument)
i tried string, int ..., but just got this kind of error
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Boost.Python.ArgumentError: Python argument types in
Image.annotate(Image, str, str)
did not match C++ signature:
annotate(Magick::Image {lvalue}, std::string, MagickLib::GravityType)
in /usr/include/Magick++/Include.h
Code: Select all
namespace MagickLib
{
#include <magick/MagickCore.h>
...}
Code: Select all
#include "magick/magick-type.h"
Code: Select all
typedef enum
{
UndefinedGravity,
ForgetGravity = 0,
NorthWestGravity = 1,
NorthGravity = 2,
NorthEastGravity = 3,
WestGravity = 4,
CenterGravity = 5,
EastGravity = 6,
SouthWestGravity = 7,
SouthGravity = 8,
SouthEastGravity = 9,
StaticGravity = 10
} GravityType;
Mike