Fill text with a pattern from an external image
Fill text with a pattern from an external image
Is there any way i can fill te text with a pattern from an external image?
			
			
									
						
							Mikko Koppanen
My blog: http://valokuva.org
			
						My blog: http://valokuva.org
Re: Fill text with a pattern from an external image
You can generate patterns with DrawPushPattern(), DrawPopPattern(), and DrawSetFillPatternURL().  However, we will add a new method for setting the fill pattern and then rendering the pattern with the MagickAnnotateImage() method.  We will try to get a patch in by the next release of ImageMagick.
			
			
									
						
										
						Re: Fill text with a pattern from an external image
Thank you!
			
			
									
						
							Mikko Koppanen
My blog: http://valokuva.org
			
						My blog: http://valokuva.org
- 
				web_artist
Re: Fill text with a pattern from an external image
Is this "solved" ? ... how can I add a pattern to a certain text ?
Thanks
			
			
									
						
										
						Thanks

Re: Fill text with a pattern from an external image
Try  DrawSetFillPatternURL() and use a file:// URL to define the drawing pattern.
			
			
									
						
										
						- 
				web_artist
Re: Fill text with a pattern from an external image
I did that, but with no success.
Any thoughts ? 
 
<?php
$im = new Imagick();
$im->newImage(200, 200, "#FFFFFF", "png");
$draw = new ImagickDraw();
$draw->rectangle( 0, 0, 200, 200 );
$draw->setFillPatternURL("/home/www/images/wood.jpg");
$im->drawImage($draw);
header( "Content-Type: image/png" );
echo $im;
?>
			
			
									
						
										
						Any thoughts ?
 
 <?php
$im = new Imagick();
$im->newImage(200, 200, "#FFFFFF", "png");
$draw = new ImagickDraw();
$draw->rectangle( 0, 0, 200, 200 );
$draw->setFillPatternURL("/home/www/images/wood.jpg");
$im->drawImage($draw);
header( "Content-Type: image/png" );
echo $im;
?>
Re: Fill text with a pattern from an external image
Does not seem to be working here either (ImageMagick 6.4.0)
			
			
									
						
							Mikko Koppanen
My blog: http://valokuva.org
			
						My blog: http://valokuva.org
