PHP | Imagick __construct() Function Last Updated : 17 Jul, 2019 Comments Improve Suggest changes Like Article Like Report The Imagick::__construct() function is an Imagick class constructor which takes the image path or image URL as parameter to instantiate the Imagick object for a specific image or a set of images. Syntax: Imagick::__construct( $files ) Parameters: This function accepts single parameter $files which holds the path to an image to load or an array of paths. It can include wildcards for file names, or can be URLs. Return Value: This function return a new Imagick object on successful execution. Exception: This function throws ImagickException exception on error. Program: This program loads the image using the URL of the image and display on the screen. php <?php // Create a new Imagick object $image = new Imagick( "https://media.geeksforgeeks.org/wp-content/uploads/geeksforgeeks-9.png"); // Browser should know that image is to be loaded on the page header("Content-Type: image/png"); // Display the image object echo $image; ?> Output: Reference: https://www.php.net/manual/en/imagick.construct.php Create Quiz Comment P piyush25pv Follow 0 Improve P piyush25pv Follow 0 Improve Article Tags : Web Technologies PHP PHP-function PHP-Imagick Explore BasicsPHP Syntax4 min readPHP Variables5 min readPHP | Functions6 min readPHP Loops4 min readArrayPHP Arrays5 min readPHP Associative Arrays4 min readMultidimensional arrays in PHP5 min readSorting Arrays in PHP4 min readOOPs & InterfacesPHP Classes2 min readPHP | Constructors and Destructors5 min readPHP Access Modifiers4 min readMultiple Inheritance in PHP4 min readMySQL DatabasePHP | MySQL Database Introduction4 min readPHP Database connection2 min readPHP | MySQL ( Creating Database )3 min readPHP | MySQL ( Creating Table )3 min readPHP AdvancePHP Superglobals6 min readPHP | Regular Expressions12 min readPHP Form Handling4 min readPHP File Handling4 min readPHP | Uploading File3 min readPHP Cookies9 min readPHP | Sessions7 min read Like