Steven Osborn on  wrote...
| I'm trying to create a composite image.  The main image is a jpeg read 
| from a file and the sub image is created during run time and I draw a 
| circle on perform various other filters to it then combine it with the 
| main image, but it leaves a white square background around the circle.  
| I've tried a dozen different things to make the background transparent, 
| but haven't had any luck.  Can anyone give me a hint as to what I need 
| to do.  I've include simplified code to help give an idea of what I'm 
| trying to do.
| 
| Image image("image.jpg");
| Image bubble(Geometry(50,50),ColorRGB(60,179,113));
| list<Drawable> drawList;
| 
| drawList.push_back(DrawableCircle(25,25,40,40));
| drawList.push_back(DrawablePointSize(_fontSize));
| // Do a lot of other stuff to circle
| bubble.draw(drawList);
|       
| image.draw(DrawableCompositeImage(_bubbleX,_bubbleY,bubble));
| // "bubble" needs a transparent background


I am not certian how to set a color with an alpha channel in Magick++
probaly as a guess it follows the RGBA style... ColorRGBA(0,0,0,.0)
Check the manual.

If you can use a named color use  "none" or "transparent".


  Anthony Thyssen ( System Programmer )    <[EMAIL PROTECTED]>
 -----------------------------------------------------------------------------
      Grok (vb) :- To drink in all the knowledge.
                   [ From the martian meaning: To Drink ] 
      --- Robert A. Heinlein   ``Stranger in a Strange Land''
 -----------------------------------------------------------------------------
     Anthony's Home is his Castle     http://www.cit.gu.edu.au/~anthony/
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to