Reply to Re: Compare Images

Your name:

Reply:


Posted by BLob on 09/27/91 11:44

> Does anyone know a simple way to compare two images to see if they are
> the same? The filenames of the images will be different, but if the
> image data is the same I would like to test for that.

Just compare the md5 codes of the two files :

if (md5(file_get_contents($filename01)) ==
md5(file_get_contents($filename02))) {
echo "The files are the same";
} else {
echo "The files are not the same";
}

> The files will be jpeg images.

The md5 should work for any type of file.

BLob

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация