title: output captcha image with font cause apache "dead"
body: <pre><code> $image = new \Imagick();
   $draw = new \ImagickDraw();
  
   $fillColor = new \ImagickPixel('black');
   $bgColor = new \ImagickPixel('gray');
   $fontSize = 24;
   $text = 'helloworld';
   $text = substr($text, 0, rand(1, 10));
   $font = '/home/koogua/font/yy.ttf';
  
   $draw-&gt;setFont($font);
   $draw-&gt;setFontSize($fontSize);
   $draw-&gt;setFillColor($fillColor);
   $draw-&gt;setStrokeAntialias(true);
   $draw-&gt;setTextAntialias(true);
   $draw-&gt;setgravity(\Imagick::GRAVITY_CENTER);
   $draw-&gt;annotation(0, 0, $text);
  
   $metrics = $image-&gt;queryFontMetrics($draw, $text);
  
   $image-&gt;newImage($metrics['textWidth'] + 30, $metrics['textHeight'] + 10, $bgColor);
   $image-&gt;setImageFormat('png');
   $image-&gt;drawImage($draw);
  
   $draw-&gt;destroy();
  
   // $image-&gt;writeImage('test.png');
  
   header('Content-Type: image/png');
   echo $image-&gt;getImageBlob();
   exit;
  
    // $this-&gt;response-&gt;setContentType( 'image/png');
    // $this-&gt;response-&gt;setContent($image-&gt;getImageBlob());
    // $this-&gt;response-&gt;send();
  </code></pre>
  
  <p>enviroment: phalcon</p>
  
  <p>output with font  : refresh the page 1- 5 times, capcha image is ok,  after 5 times, apache "dead" </p>
  
  <p>output without font : ok</p>
  
  <p>save file : ok</p>
  
  <p><strong>when I set font size to 18, everything is ok, other font size will cause apache "dead", seems 18 is the only luck number, very strange, is it ?</strong></p>
  
  <hr>
  
  <p>enviroment: another php framework (rewrite is enabled)</p>
  
  <p>output with font  : ok </p>
  
  <p>output without font : ok</p>
  
  <p>save file: ok</p>
  
  <hr>
  
  <p>enviroment: pure php</p>
  
  <p>output with font  : ok </p>
  
  <p>output without font : ok</p>
  
  <p>save file: ok</p>
  
  <p>can someone test the above code ?</p>