How to set colorspace via MagickWand

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

How to set colorspace via MagickWand

Post by rmagick »

How do I set the colorspace prior to reading an image using the MagickWand API? I tried using

Code: Select all

MagickSetOption(wand, "colorspace", "rgb")
but I'm not having any luck. I see the MagickSetImageColorspace method, but it's not listed in the HTML doc.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to set colorspace via MagickWand

Post by magick »

Looks like you need MagickSetColorspace(). We'll need to code it up for the next release, 5.1.0-1. Look for the image analog methods of MagickGetColorspace(), MagickSetImageColorSpace() and MagickGetImageColorSpace(). Note, in 5.1.0-1 you want to use MagickTransformImageColorspace() to transform one image colorspace to another (e.g. RGB to CMYK).
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: How to set colorspace via MagickWand

Post by rmagick »

Thanks!
Post Reply