PDF to Image conversion in Python 3.6.5 : Issue setting dpi in PythonMagick

289 Views Asked by At

I am not able to set the dpi of an Image object. The last line in the code is always throwing me an error message.. please see below :

import PythonMagick
from PythonMagick import Image 
p = PythonMagick.Image()    
p.density('300')     # --> This is the line where the error occurs

The error is as follows :

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)
0

There are 0 best solutions below