Rozwiązanie to jest proste, wygodne i możliwe do zastosowanie w każdym formularzu.
Więcej na temat: “Captacha w Zend Framework”
< ?php
$oldFile = "testpicture.jpg";
$newFile = "NEW_testpicture.jpg";
$percent = 0.5;
list($width, $height) = getimagesize($oldFile);
$newWidth = $width * $percent;
$newHeight = $height * $percent;
$thumb = imagecreatetruecolor($newWidth, $newHeight);
$source = imagecreatefromjpeg($oldFile);
imagecopyresized($thumb, $source, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);
imagejpeg($thumb, $newFile);
?>