Comment 12 for bug 1677578

Vasya Pupkin (shadowlmd) wrote :

This example, however, works perfect:

<?php
    header("Content-Type: text/plain");
    ini_set('max_execution_time', 10);
    $st_tm = time();
    $diff = 0;
    while (1){
        $image = new \Imagick(realpath('./IMG_2466.JPG'));
        $image->thumbnailImage(64, 48, true, false);
        $image->clear;
        $image = null;
        if ((time() - $st_tm) > $diff) {
            $diff = (time() - $st_tm);
            echo "Waiting to Die " . date('h:i:s') . "\n";
            flush();
        }
    }
?>

So you only need a single big image (I used 11 MB jpeg). Doesn't work with newImage probabaly because thumbnailImage takes no time to complete and we need script killed while thumbnailImage is still working.