Everytime I upload any png file's. It just stops execution of my script and creates about 1 75MB file per png file like this "core.######" in my directory. Any idea's on a workaround? It seems to work fine with other image file formats.
PHP Code:
<?
if(isset($_POST['SubmitForm']))
{
//setup Imagick
$IMG = new Imagick();
$IMG->setFormat("gif");
//loop through possible files
for($x=1; $x< ($_POST['hidden']+1); $x++)
{
if(!empty($_FILES['file' . $x]['tmp_name']))
{
//add image to frame
$frame = new Imagick($_FILES['file' . $x]['tmp_name']);
$IMG->addImage($frame);
//100 = 1s
$IMG->setImageDelay($delay = 50);
}
}
//rand name just for testing purposes
$name = rand(1, 99999);
$IMG->writeImages("$name.gif", true); // combine all image into one single image
}
?>