"); exit; } else { $old_x=imageSX($src_img); $old_y=imageSY($src_img); $new_ratio = $new_w/$new_h; $old_ratio = $old_x/$old_y; if ($old_ratio > $new_ratio) { $thumb_w=$new_w; $thumb_h=$old_y*($new_w/$old_x); } if ($old_ratio < $new_ratio) { $thumb_w=$old_x*($new_h/$old_y); $thumb_h=$new_h; } if ($old_ratio == $new_ratio) { $thumb_w=$new_w; $thumb_h=$new_h; } if ($thumb_w == "" OR $thumb_h == ""){ $message = $message . "Unexpected error!
"; exit; } $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h); imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); if (strpos(strtolower($system[(count($system)-1)]), "jpg") !== FALSE ){ imagejpeg($dst_img,$filename,$qual); } if (strpos(strtolower($system[(count($system)-1)]), "jpeg") !== FALSE ){ imagejpeg($dst_img,$filename,$qual); } imagedestroy($dst_img); imagedestroy($src_img); $message = $message . "Image successfully created
"; } } function directory($dir,$filters) { $handle=opendir($dir); $files=array(); if ($filters == ""){ while(($file = readdir($handle))!==false){ $files[] = $file; } } else{ if ($filters != "") { $filters=explode(",",$filters); while (($file = readdir($handle))!==false){ for ($f=0;$f"; exit; } } closedir($handle); return $files; } function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } ?> - Salon Gowri -
Welcome to Salon Gowri
You can find us at Capital Gateway Centre,
34-56 Thorndon Quay, Wellington,
or phone us on (04) 473-5585.
We also have email (see the contact section).



Within this site:
• style ideas for you (all our own work)
• services we provide
• products we sell
and you can sign up to receive our email newsletter.