= $im_height) { $factor = $sz/$im_width; $im_new_width = $sz; $im_new_height = $im_height * $factor; } else { $factor = $sz/$im_height; $im_new_height = $sz; $im_new_width = $im_width * $factor; } $wm_new_width = $im_new_width; $wm_new_height = $wm_new_width * $wm_height/$wm_width; //find bottom middle placement for watermark $dest_x = ( ( $im_new_width - $wm_new_width ) / 2 ); $dest_y = $im_new_height- $wm_new_height ; $im_destfile = $root.$type.'/'.$type.'_'.$image; $wm_destfile = $base.$wm_new_width.'x'.$wm_new_height.'watermark.png'; ImageDestroy($im); ImageDestroy($wm); $wm = $base.'watermark.png'; $im = $root.$image; resampimagejpg($im_new_width, $im_new_height, $im, $im_destfile, 100, $im_width,$im_height); if(!is_file($wm_destfile)){resizealpha($wm_new_width, $wm_new_height, $wm, $wm_destfile);} watermark($im_destfile, $im_destfile, $wm_destfile, 75, $dest_x, $dest_y); } //no image check //make dir if cant find one but make sure real request if(is_file($root.'/'.$page.'.php')){ if(!is_dir($root.'/'.$type)){ @chmod($root, 0777); @chmod($base, 0777); @mkdir($root.'/'.$type,0777); @chmod($root.'/'.$type, 0777); } } //read directory if ($directory = @opendir($root)){ while($file = readdir($directory)){ if ($file != "." && $file != ".."){ if(is_file($root.$file)){ if($file != 'index.php'){@chmod($root.$file, 0777); //make image if no image if(!is_file($root.'/'.$type.'/'.$type.'_'.$file)){ makeimagefile($root,$file,$page,$size,$type,$base);} //output list of thumbs if type is thumbs If ($type == 'ws' ){ $file_name= strip_ext($file) ; $gis=getimagesize("/home/bostonco/public_html/images/gallery/$page/ws/ws_$file"); $str="
\"$file_name\"
$file_name



"; echo $str; } } } } } closedir($directory); } //process large image If ( $type == 'wb' ){ ?> Boston Confetti Photos - <? echo strip_ext($image); ?>