Imagick::clone

(PECL imagick 2.0.0)
Makes an exact copy of the Imagick object
Imagick Imagick::clone ( void )

Makes an exact copy of the Imagick object.

Returns:

A copy of the Imagick object is returned.

This function has been DEPRECATED as of imagick 3.1.0 in favour of using the clone keyword.

Changelog:
3.1.0

The method was deprecated in favour of the clone keyword.

Examples:
Imagick object cloning in different versions of imagick
<?php
// Cloning an Imagick object in imagick 2.x and 3.0:
$newImage = $image->clone();

// Cloning an Imagick object from 3.1.0 on:
$newImage = clone $image;
?>

doc_php
2016-02-24 16:00:50
Comments
Leave a Comment

Please login to continue.