I'm trying to adjust image levels with pgmagick on Windows 7, Python 3.5.1.
All the variations I've come up with either end up with an almost completely white image or the error below:
Traceback (most recent call last):
File "test.py", line 7, in <module>
im.level('48%,0.5,52%')
Boost.Python.ArgumentError: Python argument types in
Image.level(Image, str)
did not match C++ signature:
level(class Magick::Image {lvalue}, double, double, double)
I've also tested my level settings on Photoshop so they make sense and don't result in a white picture. Here's my code:
from pgmagick import Image
im = Image('image.jpg')
im.level('48%,0.5,52%') # not working
# im.level('48%', 0.5, '52%') # not working
# im.level(48,0.5,52) # no error but picture almost completely white
Just to note, I was able to adjust the image levels with Node.js running the following code:
gm('image.jpg')
.level('48%', 0.5, '52%')
Any help and ideas are very much appreciated!