title: Script for optimizing images for web
body: <p>In PHP, imagecreatefromjpeg() can optimize an image, as it saves the image with an appropriate quality for web. However, this is not the best option. I optimized again the php-generated image by <a href="http://www.smushit.com/ysmush.it/" rel="nofollow">Yahoo Smush</a> and it optimized the image by a factor of 5-10%. This is not strange indeed; but alternatively I used <a href="http://www.imageoptimizer.net/" rel="nofollow">http://www.imageoptimizer.net/</a> and it optimized my php-generated images by a factor of more than 50%.</p>
  
  <p>This is indeed a significant improvement to save bandwidth and fast load of the webpages. I wonder what technology they use. They offer a windows-based application, but no description about their method.</p>
  
  <p>Anyway, my question is how we can make a script (in php, perl, python, etc) to optimize to this extent?</p>