ImageMagick - Convert image RGB to CMYK using ICC in Python

Is there anyway to convert an RGB image into a CMYK one using ICC in a python ImageMagick binding. I know you can easily do it in the command-line, but is there anyway to do it in a binding like Wand (preferably Wand)? What I have now:

from wand.image import Image
from urllib.request import urlopen
response = urlopen('https://www.website.com/path/to/image.jpg')
try:
    with Image(file=response) as img:
        img.type = 'truecolor'
        img.alpha_channel = True
        img = img.colorspace = 'cmyk'
        img.save(filename='converted.jpg')
finally:
    response.close()

results in the image having HORRIBLY inaccurate colors, but in the correct color space. Anyway to convert using a profile? Thanks.

0 Comment

NO COMMENTS

LEAVE A REPLY

Captcha image