Looking for GetImageAlphaChannel

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

Looking for GetImageAlphaChannel

Post by rmagick »

I'm looking for a MagickCore function that returns the value in image->matte so I can stop referencing that field directly. Does such a function make sense?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Looking for GetImageAlphaChannel

Post by magick »

Does IsOpaqueImage() work for you? If not, we can add a method that just returns the image->matte member.
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Looking for GetImageAlphaChannel

Post by rmagick »

RMagick has a method that calls IsOpaqueImage. I'm thinking about a function that simply returns the MagickTrue or MagickFalse depending on the value in image->matte. With SetImageAlphaChannel and this new function I can safely deprecate the RMagick methods that set and get image->matte directly.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Looking for GetImageAlphaChannel

Post by magick »

Ok, GetImageAlphaChannel() will be available in ImageMagick 6.3.9-2 Beta by tomorrow.
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Looking for GetImageAlphaChannel

Post by rmagick »

Thanks! I'll add a method to RMagick.

RMagick of course refers to other Image fields directly, but I noticed that you've deprecated the old -matte option in favor of the -alpha option, so I'm trying to do the same. I've added a setter method that calls SetImageAlphaChannel. This will be the getter.
rmagick
Posts: 245
Joined: 2006-03-16T17:30:48-07:00
Location: Durham, NC, USA

Re: Looking for GetImageAlphaChannel

Post by rmagick »

I d/l'd 6.3.9-2 beta and the new method looks fine. Thanks.
Post Reply