title: ImageMagick 6.5.4: Call to undefined method Imagick::readFromBlob()
body: <p>I have got this error happening when trying to manipulate an image using ImageMagick and PHP. Here is the code:</p>
  
  <pre><code>&lt;?php
  
  require 'config.php';
  
  // Variables
  $x = (int) $_POST['x'];
  $y = (int) $_POST['y'];
  
  $width = (int) $_POST['width'];
  $height = (int) $_POST['height'];
  
  // Source
  $pos = strpos($_POST['src'], 'base64,') + 7;
  $contents = base64_decode(substr($_POST['src'], $pos));
  
  // Mime types
  $types = array(
      'jpg' =&gt; 'image/jpeg',
      'png' =&gt; 'image/png',
      'gif' =&gt; 'image/gif'
  );
  
  // Data
  $data = array(
      'mime' =&gt; substr($_POST['src'], 5, $pos - 13)
  );
  
  $data['ext'] = array_search($data['mime'], $types);
  
  if (!$data['ext']) {
      $data['ext'] = 'png';
  }
  
  // Image
  $image = new Imagick;
  
  $image-&gt;readFromBlob($contents);
  
  if ($data['ext'] == 'gif') {
      $frames = $image-&gt;coalesceImages();
  } else {
      $frames = array($image);
  }
  
  foreach ($frames as $frame) {
      $image-&gt;resizeImage($width, $height, Imagick::FILTER_CATROM, 0);
      $image-&gt;cropImage($config['width'], $config['height'], $x, $y);
  }
  
  // Save
  $path = $config['saveas'];
  
  foreach ($data as $key =&gt; $value) {
      $path = str_replace('{' . $key . '}', $value, $path);
  }
  
  $path = dirname(__FILE__) . '/../../' . $path;
  
  $image-&gt;writeImage($path, $data['ext'] == 'gif');
  
  echo json_encode(true);
  </code></pre>
  
  <p>And here's the info from phpinfo:</p>
  
  <ul>
  <li>imagick module   enabled</li>
  <li>imagick module version   3.1.0RC2</li>
  <li>imagick classes  Imagick, ImagickDraw, ImagickPixel,
  ImagickPixelIterator</li>
  <li>ImageMagick version  ImageMagick 6.5.4-7 2012-05-07 Q16 OpenMP</li>
  </ul>
  
  <p>When using F12 in chrome and going through the processing of a small image this is my error in it's entirety:</p>
  
  <p>AJAX error AvatarChanger.js:354</p>
  
  <pre><code>&lt;br /&gt;
  &lt;b&gt;Fatal error&lt;/b&gt;:  Call to undefined method Imagick::readFromBlob() in        &lt;b&gt;/home/solidarity/cog/avatar/php/done.php&lt;/b&gt; on line &lt;b&gt;37&lt;/b&gt;&lt;br /&gt;
  </code></pre>
  
  <p>If anyone here can help or has any ideas, please share :)</p>