Comment 5 for bug 203023

Revision history for this message
noah (noah1-deactivatedaccount) wrote :

I would like to add that the Imagick extension to PHP doesn't work because of this.

Here's a demoscript to illustrate just this.
<?php

for($i = 1; $i < $argc; $i++) {
 $f = $argv[$i];
        try {
                $img = new Imagick($f);

                $img->setImageFormat("jpg");
                $img->setCompression(Imagick::COMPRESSION_JPEG);

                echo "Scaling image $f\n";
                $img->thumbnailImage(1024, 768, TRUE);

                echo "Writing image $f\n";
                $img->setCompressionQuality(80);
                if($img->writeImage("output/". basename($f)) !== FALSE) {
                }
  else
   die("Fuck: writeImage() -> FALSE\n");
        }
        catch (Exception $e) {
                echo "EXCEPTION: Failed to process $f:" . $e->getMessage() ."\n";
        }
}

?>

$ php knark.php source/*.jpg
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613/imagick.so' - libWand.so.9: cannot open shared object file: No such file or directory in Unknown on line 0

Fatal error: Class 'Imagick' not found in knark.php on line 7