Ugrás a tartalomhoz Lépj a menübe
 


iworld kis állatkák

$h) { $ratio = $new_w / $new_h; $new_w = round($h / $ratio); $new_h = $h; } } return array($img, $new_w, $new_h); } function save_image($url, $path, $name, $w = 0, $h = 0) { if (exif_imagetype($url) == 1) { $irsc = imagecreatefromgif($url); $details = getimagesize($url); } if (exif_imagetype($url) == 2) { $irsc = imagecreatefromjpeg($url); $details = getimagesize($url); } if (exif_imagetype($url) == 3) { $irsc = imagecreatefrompng($url); $details = getimagesize($url); } if (($w == 0) && ($h == 0)) { $nw = $details[0]; $nh = $details[1]; } else { $img = $url; list($imname,$nw,$nh) = resize($w,$h); } $nimg = imagecreatetruecolor($nw, $nh); if (exif_imagetype($url) == 3) { imagealphablending($nimg, true); $color = imagecolortransparent($nimg, imagecolorallocatealpha($nimg, 0, 0, 0, 127)); imagefill($nimg, 0, 0, $color); imagesavealpha($nimg, false); } imagecopyresampled($nimg,$irsc,0,0,0,0,$nw,$nh,$details[0],$details[1]); if (exif_imagetype($url) == 1) { imagegif($nimg,$path.'/'.$name); } if (exif_imagetype($url) == 2) { imagejpeg($nimg,$path.'/'.$name); } if (exif_imagetype($url) == 3) { imagepng($nimg,$path.'/'.$name); } return true; } ?>
 
 

 

Utolsó kép



Archívum

Naptár
<< Szeptember / 2019 >>


Statisztika

Online: 1
Összes: 117385
Hónap: 1476
Nap: 46