diff options
| author | Mike Wey | 2011-04-27 22:41:18 +0200 |
|---|---|---|
| committer | Mike Wey | 2011-04-27 22:41:18 +0200 |
| commit | 236765414d6dd0aca6ce7a3d720adcb9ab9b0597 (patch) | |
| tree | 86ad5ae85826a74125374dc0635aeeb9b2fda61c /dmagick/Image.d | |
| parent | 1eb8a162bb5540f23b4f800942b7c2e2466ecfcb (diff) | |
Switch matte for alpha
Diffstat (limited to 'dmagick/Image.d')
| -rw-r--r-- | dmagick/Image.d | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/dmagick/Image.d b/dmagick/Image.d index 30505b4..bea432a 100644 --- a/dmagick/Image.d +++ b/dmagick/Image.d @@ -393,6 +393,19 @@ class Image } /** + * Set a flag to indicate whether or not to use alpha channel data. + */ + void alpha(AlphaChannelType type) + { + SetImageAlphaChannel(imageRef, type); + } + ///ditto + bool alpha() const + { + GetImageAlphaChannel(imageRef); + } + + /** * Number of ticks which must expire before displaying the * next image in an animated sequence. The default number * of ticks is 0. By default there are 100 ticks per second. @@ -1076,26 +1089,6 @@ class Image } /** - * If true, honor the opacity values in the image pixels. - * If set True, store matte channel if the image - * has one otherwise create an opaque one. - */ - void matte(bool flag) - { - // If the image has a matte channel, and it's - // not desired set the matte channel to fully opaque. - if ( !flag && imageRef.matte ) - SetImageOpacity(imageRef, OpaqueOpacity); - - imageRef.matte = flag; - } - ///ditto - bool matte() const - { - return imageRef.matte != 0; - } - - /** * Set the image transparent color. The default is "#bdbdbd". */ void matteColor(string color) |
