how to pass these arguments in PythonMagick
Posted: 2007-09-27T02:13:13-07:00
Hi everyone,
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)
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
some other things maybe helpfull
in /usr/include/Magick++/Include.h
then in /usr/include/magick/MagickCore.h
finnally in /usr/include/magick/magick-type.h found it
I want to know how can i use these gravities? thx again for any help
Mike
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