$new_width) $x=$x_da; else $x=$new_width; } } $new_height = round($scale*$height); if (!is_numeric($y)) { if (!$riempi) $y=$new_height; else { list($y_da,$y_a)=split(":",$y); if (is_numeric($y_da) && $y_da>$new_height) $y=$y_da; else $y=$new_height; } } if (!($second=imagecreatetruecolor($new_width, $new_height))) return 1; if (!imagecopyresampled($second,$first,0,0,0,0,$new_width,$new_height,$width,$height)) return 1; if ($taglia || $riempi) { if (!($terza=imagecreatetruecolor($x, $y))) return 1; if ($riempi) { list($r,$g,$b)=split(",",$riempi); $color = ImageColorAllocate( $terza, $r, $g, $b ); imagefill($terza,0,0,$color); } $left= ($new_width-$x)>0?($new_width-$x)/2:0; $top = ($new_height-$y)>0?($new_height-$y)/2:0; $dst_left=($x-$new_width)>0?($x-$new_width)/2:0; $dst_top = ($y-$new_height)>0?($y-$new_height)/2:0; if (!imagecopy($terza,$second,$dst_left,$dst_top,$left,$top,$new_width,$new_height)) return 1; if (!$funzione2($terza,$to,100)) return 1; imagedestroy($terza); } else { if (!$funzione2($second,$to,100)) return 1; } imagedestroy($second); imagedestroy($first); return false; } } ?>

Auto che vuoi vendere: