Page 1 of 1

Setting image/wand opacity

Posted: 2006-03-04T09:39:43-07:00
by el_supremo
I would like to use MagickWand to read in a JPG image, which does not have an opacity layer, and then set it so that it does have a given opacity (which should implicitly force the image's matte value to MagicTrue) so that I can use it in subsequent operations requiring that it have a matte/opacity layer and/or write it out as a PNG. So far, I haven't been able to find a MagicWand function or combination of functions which will do this.
ImageMagick has the SetImageOpacity function which does exactly what I want but this function does not have a corresponding function in the MagicWand API. Can this, or an equivalent function be added to MagickWand?

Thanks
Pete

Posted: 2006-03-04T11:21:55-07:00
by magick
MagickWand has the MagickSetImageMatte() method which sets the image opacity channel to completely opaque.

Posted: 2006-03-04T12:02:37-07:00
by el_supremo
Thanks.
MagickSetImageMatte isn't in the 6.2.6 code that I've been using - it only has MagickSetImageMatteColor. I really must upgrade.

Pete