[Python-modules-team] patch for python-pythonmagick

Carsten Busse busse at backend-systems.net
Wed Aug 31 11:02:35 UTC 2011


Hello all,

I wrote a patch for python-pythonmagick which solves a serious problem 
with Inheritance of Drawable* classes inside the module.

In its current form, the Image.draw method is always failing when 
someone tries for example to pass a DrawableText instance (or any other 
Drawable*), which removes quite a bit of functionality.

My patch solves this by adding a special directive for boost, so it 
recognises that the Drawable* classes inherit from Drawable.

Basically I've added lines like 
"implicitly_convertible<Magick::DrawableText,Magick::Drawable>();" to 
the export function in all Drawable* Classes.

I also took the freedom to put in all the missing prototypes in 
Pythonmagick/__init__.py so all the classes are easily available (again? 
looking through the web it seems once upon a time they were in there and 
got removed for some unknown reason).

The patch is already included in the newest version 0.9.7 from the 
imagemagick website, but it was developed against the current debian 
version 0.9.1-3+b1.

I had also tested it down to version 0.7.7 successfully (some of the 
prototypes in __init__.py have to be commented out there due to missing 
classes in that version).


The patch itself is available as uuencoded text in my posting on 
http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=19278


If there is anything I can help to get this applied into the debian 
repository, please tell me.



More information about the Python-modules-team mailing list