PHP | Imagick textureImage() Function
The Imagick::textureImage() function is an inbuilt function in PHP which creates repeatedly tiles the texture image.
Syntax:
Imagick Imagick::textureImage( $texture_wand )
Parameter: This function accepts single parameter $texture_wand. It is an Imagick object to use as texture image.
Return Value: This function returns a new Imagick object that has the repeated texture applied.
Errors/Exceptions: This function throws ImagickException on error.
Below program illustrates the Imagick::textureImage() function in PHP:
Program:
<?php // Create an imagick object $image = new Imagick(); // Create an image of given size $image->newImage(640, 480, new ImagickPixel('green')); // Set the image format $image->setImageFormat("jpg"); // Take image input and create imagick object $texture = new Imagick( // Scale the image $texture->scaleimage($image->getimagewidth() / 4, $image->getimageheight() / 4); // textureImage function $image = $image->textureImage($texture); header("Content-Type: image/jpg"); // Display the image echo $image; ?> |
Output:

Related Articles:
Reference: http://php.net/manual/en/imagick.textureimage.php
Recommended Posts:
- PHP | Imagick getImageGamma() Function
- PHP | Imagick flipImage() Function
- PHP | Imagick getImageColorspace() Function
- PHP | Imagick shadeImage() Function
- PHP | Imagick vignetteImage() Function
- PHP | Imagick getImageColors() Function
- PHP | Imagick brightnessContrastImage() Function
- PHP | Imagick getImageSignature() Function
- PHP | Imagick getImageTicksPerSecond() Function
- PHP | Imagick getInterlaceScheme() Function
- PHP | Imagick opaquePaintImage() Function
- PHP | Imagick magnifyImage() Function
- PHP | Imagick radialBlurImage() Function
- PHP | Imagick randomThresholdImage() Function
- PHP | Imagick identifyImage() Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



