Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call resolutionUnits() raises TypeError: No to_python (by-value) converter found for C++ type: MagickCore::ResolutionType #22

Open
carygravel opened this issue Jun 7, 2023 · 1 comment

Comments

@carygravel
Copy link

carygravel commented Jun 7, 2023

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.

@carygravel
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant