PHP interesse |
|
hey
ik gebruik dit script :
$image_new = "".$plaatje->imgurl.""; //url of picture
$image_new = str_replace(' ','%20',$image_new); //take url and replace spaces
$max_width= "250"; //maximum width allowed for pictures
$resize_width= "250"; //same as max width
$max_height= "20"; //maximum width allowed for pictures
$resize_height= "20"; //same as max width
$size = getimagesize("$image_new"); //get the actual size of the picture
$width= $size[0]; // get width of picture
$height= $size[1]; // get height of picture
if ($width>$max_width){
$new_width=$resize_width; // Resize Image If over max width
}
else {
$new_width=$width; // Keep original size from array because smaller than max
}
echo "<IMG src=\"$image_new\" border=1 width=$new_width>"; //print image with new width
$image_new = "".$plaatje->imgurl.""; //url of picture $image_new = str_replace(' ','%20',$image_new); //take url and replace spaces $max_width= "250"; //maximum width allowed for pictures $resize_width= "250"; //same as max width $max_height= "20"; //maximum width allowed for pictures $resize_height= "20"; //same as max width $size = getimagesize("$image_new"); //get the actual size of the picture $width= $size[0]; // get width of picture $height= $size[1]; // get height of picture if ($width>$max_width){ $new_width=$resize_width; // Resize Image If over max width } else { $new_width=$width; // Keep original size from array because smaller than max } echo "<IMG src=\"$image_new\" border=1 width=$new_width>"; //print image with new width
maar dit script is alleen voor de breedtje , kan iemand voor mij dit script ombouwen dat hij ook de hoogte verkleint.??
bvd
|