title: Suggest lightbox script that works with <img src="script.php" />?
body: <p>I have a PHP script which dynamically generats  images on each request. These images are not saved on server. to do this, I use the following html</p>
  
  <p><code>&lt;img src="script.php?parameter1=foo&amp;parameter2=bar" width="50" height="50" /&gt;</code></p>
  
  <p>This fires off an request to <code>script.php</code>; which dynamically creates the images based on parameters &amp; just <code>echo</code> image data in following format:</p>
  
  <pre><code>$img = customFunction_generate_report_image($_POST['parameter1'],$_POST['parameter2']);
  header('Content-type: image/png');
  echo $img;
  </code></pre>
  
  <p>This works &amp; displays image in browser as expected. Now, I want to implement a lightbox so, when the user clicks on the image in broswer. the image expands &amp; gets displayed in lightbox. </p>
  
  <p>Normally, I use <a href="http://jacklmoore.com/colorbox/" rel="nofollow">Colorbox</a> for lightbox but I think it expects as <code>&lt;img src="foo.png"</code> and moreover, it seem to make addititonal request to server.</p>
  
  <p>I want a method using which existing image in dom can be used for lightbox. Any pointer on how to accomplish this would appreciated.</p>
  
  <p>Thanks</p>