title: php resize blob image
body: <p>I am echoing the data received from a blob column from mysql like this:</p>
  
  <pre><code>&lt;?php
  $con = mysql_connect("localhost","username","pass");
  if (!$con)
    {
    die('Could not connect: ' . mysql_error());
    }
    mysql_select_db("mydb", $con);
    if(isset($_GET['imageid'])){
        $img=$_GET['imageid'];
        $sql="SELECT image FROM vrzgallery WHERE id=$img";
        $que=mysql_query($sql);
        $ar=mysql_fetch_assoc($que);
        echo $ar['image'];
        header('Content-type: image/jpeg');
    }
  
  ?&gt;
  </code></pre>
  
  <p><strong>QUESTION</strong>: How can i reduce my image to say like 500px X 500px</p>