Greetings,
I am hoping this is a place that can help me out with some PythonMagick problems. If not, my apologies.
Environment:
Linux 2.6.35-28-generic #50-Ubuntu SMP Fri Mar 18 19:00:26 UTC 2011 i686 GNU/Linux
ImageMagick 6.6.2-6 2010-12-02 Q16
PythonMagick 0.9.1-3ubuntu2
I am trying to draw a simple line on an image. Really basic stuff.
My script:
#!/usr/bin/env python
from PythonMagick import *
from PythonMagick._PythonMagick import *
pic = 'image.jpg'
img = Image()
img.read(pic)
width = img.size().width()
height = img.size().height()
line = DrawableLine(0, 0, width, height)
img.draw(line)
img.write('newimage.jpg')
My results:
Traceback (most recent call last):
File "./pmgk2.py", line 10, in <module>
img.draw(line)
Boost.Python.ArgumentError: Python argument types in
Image.draw(Image, DrawableLine)
did not match C++ signature:
draw(Magick::Image {lvalue}, std::list<Magick::Drawable, std::allocator<Magick::Drawable> >)
draw(Magick::Image {lvalue}, Magick::Drawable)
I have spent considerable time attempting to do what I had hoped would be a simple task. However, regardless of what I have tried, I am unable to get this to work.
Can anyone shed some light as to what I am doing wrong?
Thanks
JS
PythonMagick draw line issue
Re: PythonMagick draw line issue
Better late than never
I had a similar problem using DrawableText and made a patch for pythonmagick to get it back to work.
I posted the patch here: viewtopic.php?f=1&t=19278
I had a similar problem using DrawableText and made a patch for pythonmagick to get it back to work.
I posted the patch here: viewtopic.php?f=1&t=19278