我无法设置Image对象的dpi。代码的最后一行总是向我抛出一条错误消息。.请参见以下内容:
import PythonMagick
from PythonMagick import Image
p = PythonMagick.Image()
p.density('300') # --> This is the line where the error occurs
错误如下:
Traceback (most recent call last):
File "<ipython-input-45-3dabab8b125b>", line 2, in <module>
p.density('300')
ArgumentError: Python argument types in
Image.density(Image, str)
did not match C++ signature:
density(class Magick::Image {lvalue})
density(class Magick::Image {lvalue}, class Magick::Point)