Hi,
I want to set the opacity level of some text i'm placing on an image, and I can't figure any way to do it.
Here's the meat of my test harness , which works fine, but only does fully opaque text.
So the question, is what do i need to do to set the text say.. 50% opaque/transparent.. I currently use MagickEvaluateImage to set opacity on images for composite operations, but can't find anything that acts like that on a DrawingWand.
--
$source = NewMagickWand();
$drawing = NewDrawingWand();
$pixel = NewPixelWand();
PixelSetColor($pixel,"#ff0000");
DrawSetFillColor($drawing,$pixel);
DrawSetFont ( $drawing , " Arial " ) ;
DrawSetFontSize( $drawing,$fontsize);
DrawSetFontWeight($drawing,100);
MagickReadImage($source,'3.jpg');
MagickSetFormat($source, 'JPEG');
DrawAnnotation($drawing, $xLocation, $yLocation + $height , "test test");
MagickDrawImage($source, $drawing);
MagickWriteImage($source,'output.jpg');
--
Creating transparent Text
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Fantastic
That does the trick, pixelwand controls all colors and such, check.
If you have an answer for this one,
http://redux.imagemagick.org/discourse- ... php?t=7938
I'll buy you a nice seafood dinner.
If you have an answer for this one,
http://redux.imagemagick.org/discourse- ... php?t=7938
I'll buy you a nice seafood dinner.
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00