0

I found this description link_1, link_2.

Trying to do so

import PythonMagick
img = PythonMagick.Image('file.png')
img.colorSpace('GRAYColorspace')

Return this

ArgumentError: Python argument types in
    Image.colorSpace(Image, str)
did not match C++ signature:
    colorSpace(class Magick::Image {lvalue})
    colorSpace(class Magick::Image {lvalue}, enum MagickCore::ColorspaceType)

How to do it?

pypy
  • 1
  • 1
  • I may be wrong but I think PythonMagick project has been dead for more, than a couple of years. For image manipulation is better to use PIL or Pillow http://pillow.readthedocs.org/en/latest/ – zero323 Sep 09 '13 at 12:27
  • I need to draw a circle, arc and other elements with a thickness of more than 1. PIL do not know how to – pypy Sep 09 '13 at 12:39

1 Answers1

0

PythonMagick already supports ColorSpaceTypes since version 9.10

http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=25229

Here's an example to accomplish what you're trying to do:

import PythonMagick as pm
img = pm.Image('file.png')
img.colorSpace(pm.ColorspaceType.GRAYColorspace)
marcosnils
  • 399
  • 4
  • 7