PythonMagick
PythonMagick copied to clipboard
Call resolutionUnits() raises `TypeError: No to_python (by-value) converter found for C++ type: MagickCore::ResolutionType`
The following code:
import subprocess
import PythonMagick
subprocess.run(["convert","-units","PixelsPerCentimeter","-density","300","xc:white","test.jpg"])
print(PythonMagick.Image("test.jpg").resolutionUnits())
produces TypeError: No to_python (by-value) converter found for C++ type: MagickCore::ResolutionType.
I would have expected a string containing PixelsPerCentimeter, or for other images PixelsPerInch or Undefined.
Similarly, calling image.resolutionUnits("PixelsPerInch") raises:
E Boost.Python.ArgumentError: Python argument types in
E Image.resolutionUnits(Image, str)
E did not match C++ signature:
E resolutionUnits(Magick::Image {lvalue})
E resolutionUnits(Magick::Image {lvalue}, MagickCore::ResolutionType)