title: Captcha image is generated but numbers are not generated
body: <p>This is generate.php code:</p>
  
  <pre><code>&lt;?php
  ob_start();
  session_start();
  header('content-type:image/jpeg');
  $text=$_SESSION['secure'];
  $font_size=30;
  $width=100;
  $height=40;
  $image=imagecreate($width, $height);
  imagecolorallocate($image, 0, 0, 0);
  $text_color=imagecolorallocate($image, 255, 255, 255);
  $font='Consolas.ttf';
  for($x=1; $x &lt;= 30; $x++) {
      $x1 = rand(1, 100);
      $y1 = rand(1, 100);
      $x2 = rand(1, 100);
      $y2 = rand(1, 100);
      imageline($image, $x1, $y1, $x2, $y2, $text);
  }
  imagettftext($image, $font_size, 0, 15, 30, $text_color, $font, $text);
  $imgSrc="out.png";
  imagepng($image, $imgSrc);
  ?&gt;
  </code></pre>
  
  <p>This is HTML code to display an image, here out.png is successfully generated and loaded into the page but numbers cannot be found. </p>
  
  <pre><code>&lt;div class="form-group mx-auto text-center"&gt;
      &lt;input type="hidden" name="cap_hidden" value="&lt;?php echo $_SESSION['secure']; ?&gt;"&gt;
      &lt;img src="out.png"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I have found one similar question but it didnt help me, thats why I have posted it here. 
  The problem is the image is generated with lines only but no numbers are visible. </p>