title: Loading of PNG image through CGI program failing with errors
body: <p>I am writing to write a cgi script to display a png image in a browser. When user clicks on the 'Submit' form in the HTML page , the CGI program is called to display the image . </p>
  
  <p>But this is not working for me . The script is trying to open the PNG image in a browser,but the image contains the following error message</p>
  
  <pre><code>"The image “http://localhost/cgi-bin/image.sh?subbtn=Submit” cannot be  displayed, because it contains errors."
  </code></pre>
  
  <p>The following is the snippet of CGI code. </p>
  
  <pre><code>!/bin/bash
  
  echo "Content-type: text/html"
  echo "Content-type: image/png"
  
  echo ""
  
  echo  "&lt;html&gt;"
  echo "&lt;body&gt;"
  echo "Hi"
  
  echo "&lt;img src="/home/zaman/ssdggraph/SSDGhistory.png" alt="DG-Reports"&gt;"
  echo "&lt;/body&gt;"
  echo "&lt;/html&gt;"
  </code></pre>
  
  <p>If I remove the below line from the above code , then the text <code>"DG-Reports"</code> in <code>alt</code> section from <code>img src</code> tag is displayed. </p>
  
  <pre><code>echo "Content-type: image/png"
  </code></pre>
  
  <p>Also if I write the same code in plain HTML page , the PNG image is displayed fine. </p>
  
  <p>Please suggest what I am missing in the code to display the image without any errors ?</p>