document_root."/img/logoPF.jpg"); // // $logow = imagesx($logo); // $logoh = imagesy($logo); // //allineato in basso a destra con margine di 10px // imagecopymerge($image, $logo, $w-($logow+10), $h-($logoh+10), 0, 0, $logow, $logoh, 60); // //CENTRATO NEL MEZZO ALL'IMMAGINE // $centerX = ($w/2)-($logow/2); // $centerY = ($h/2)-($logoh/2); // imageinterlace($image,1); list($width, $height) = getimagesize($immagine); // print $width." ".$height; // $new_width= $width * 0.1; // $new_height= $height * 0.1; if ($_GET['h']) { $new_height= $_GET['h']; if ($height > $_GET['h']) { $new_width = round(($width*$_GET['h']) / $height); } if ($height <= $_GET['h']) { $new_width = $width; $new_height= $height; //$new_height = round(($height*$service -> options['img_item_w']) / $width); } } else { $new_width= $_GET['w']; if ($width > $_GET['w']) { $new_height = round(($height*$_GET['w']) / $width); } if ($width <= $_GET['w']) { $new_width = $width; $new_height= $height; //$new_height = round(($height*$service -> options['img_item_w']) / $width); } } //$new_height = $service -> options['img_box_h']; $image_p = imagecreatetruecolor($new_width, $new_height); imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height); if ($gif == 1) { ImageGIF($image_p); } else if ($png == 1) { ImagePNG($image_p); } else { ImageJPEG($image_p,'',85); } ImageDestroy($image); ImageDestroy($image_p); } ?>