feature request: splicing with transparency

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
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

feature request: splicing with transparency

Post by RetroJ »

Hi,
I would like to be able to -splice with a transparent color when the image I am operating on does not necessarily already have an alpha channel. What are your thoughts on this patch:

http://jjfoerch.com/bitbucket/splice-transparency.diff

Code: Select all

--- ImageMagick-6.3.0/magick/transform.c	2006-07-03 13:23:05.000000000 -0400
+++ ImageMagick-6.3.0-tmp/magick/transform.c	2006-11-04 14:46:47.000000000 -0500
@@ -1210,6 +1210,8 @@
       splice_image=DestroyImage(splice_image);
       return((Image *) NULL);
     }
+  if (splice_image->background_color.opacity != OpaqueOpacity)
+      splice_image->matte=MagickTrue;
   /*
     Splice image.
   */
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

We'll get your patch into ImageMagick 6.3.0-3 Beta. Thanks.
RetroJ
Posts: 108
Joined: 2006-10-25T08:12:50-07:00

Post by RetroJ »

Thanks!
Post Reply