0

Trying to convert the Image Magick convert command:

convert -size 50x50 -background white -fill black -gravity center label:Ryan test.gif

to magick++/PythonMagick. Cannot use annotate since I need to have the text auto-sized, which 'label' does. I can do

img = PythonMagick.Image('50x50', 'none')
img.backgroundColor('white')
img.fillColor('black')
img.read('label:Ryan')
img.write('test.gif')

but img.read does not allow me to specify gravity. Is there a way to do this without using subprocess or os?

emcconville
  • 23,800
  • 4
  • 50
  • 66
  • I may be wrong, but as far as I know, `PythonMagick` has not been in active development for years, and `Magick++` refers purely to the C++ **ImageMagick** bindings. If anyone knows better, kindly ping me. I would suggest you consider using `wand` instead http://docs.wand-py.org/en/0.5.9/ – Mark Setchell May 03 '20 at 10:53
  • ended up using PIL. Does what I need, but I'll take a look at wand too. Thanks. – Rutwik Kharkar May 04 '20 at 13:00

0 Answers0