Forum und email

Imagick::compareImages

(No version information available, might be only in CVS)

Imagick::compareImages — Compares an image to a reconstructed image

Popis

array Imagick::compareImages ( Imagick $compare , int $metric )
Warning

Táto funkcia nie je momentálne zdokumentovaná; je dostupný len zoznam argumentov.

Warning

Táto funkcia je EXPERIMENTÁLNA. Správanie tejto funkcie, názov tejto funkcie a hocičo iné zdokumentované o tejto funkcii sa môže zmeniť bez povšimnutia v budúcom vydaní PHP. Používajte túto funkcii na svoje vlastné riziko.

Returns an array containing a reconstructed image and the difference between images.

Parametre

compare

An image to compare to.

metric

Provide a valid metric type constant. Refer to this list of metic constants.

Vrátené hodnoty

Returns TRUE on success.

Príklady

Example#1 Using Imagick::compareImages():

Compare images and display the reconstructed image

<?php

$image1 
= new imagick("image1.png");
$image2 = new imagick("image2.png");

$result $image1->compareImage($image2Imagick::METRIC_MEANSQUAREERROR);
$result[0]->setImageFormat("png");

header("Content-Type: image/png");
echo 
$result[0];

?>