PHP Classes

File: basefilecomparer.php

Recommend this page to a friend!
  Classes of Damian Cipolat   PHP Image Compare   basefilecomparer.php   Download  
File: basefilecomparer.php
Role: Example script
Content type: text/plain
Description: archivo base comparador de imagenes
Class: PHP Image Compare
Compare images to determine how similar they are
Author: By
Last change:
Date: 9 years ago
Size: 432 bytes
 

Contents

Class file image Download
<?php
   
   
include 'comparer.php';
   
   
$comparador = new comparadorImg(8);
   
   
$f1 = './mina.jpg';
   
$f2 = './mina2.jpg';
   
   
$hash = $comparador->getHash_img('./mina.jpg');
    echo
$hash;
   
$dif = $comparador->comparar_imgs($f1,$f2);
   
    echo
"<img src='".$f1."'><br><br>";
    echo
"<img src='".$f2."'><br><br>";
       
    echo
"<b>Diferencias</b> ".$dif."%<br>";
    echo
"<b>Similitudes</b> ".(100-$dif)."%<br>";
   
?>