All pastes #466709 Raw Edit

Untitled

public text v1 · immutable
·published 2007-05-01 03:53 UTC
rendered paste body
<?php 

// Shut off error reporting so we don't get any errors displaying for visitors
//error_reporting(0);

//   $sourcelocation = $_SERVER['DOCUMENT_ROOT'] . '/webroot/r/e/retro004/www/weather/images/br1_0.png'; 
   $sourcelocation = '/webroot/r/e/retro004/www/weather/images/br1_0.png'; 
  // echo $sourcelocation;  
   $quality=90; 
   $thumb_w = 130; 
   $thumb_h = 130; 

   header("Content-type: image/png"); 
   $source = imagecreatefrompng($sourcelocation); 
   $orig_size=getimagesize($sourcelocation); 

       $thumb=imagecreatetruecolor($thumb_w,$thumb_h); 
       imagecopyresampled($thumb,$source,0,0,0,0,$thumb_w,$thumb_h,$orig_size[0],$orig_size[1]); 

 imagepng($thumb); 
   imagedestroy($thumb); 
?>