Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/06/2006, 09:14
GreenLink
 
Fecha de Ingreso: febrero-2005
Ubicación: Tamaulipas - México
Mensajes: 328
Antigüedad: 19 años, 2 meses
Puntos: 0
Exclamación evitar saturacion

hola, hace poco hise un sistema de galerias [BEWARE XXX]
www[.]sexogalerias[.]org
pongo [.] para evitar malentendidos
y tengo un problema, como cargo todas las imagenes poniendoles un marca de agua y redimensionandolas se me alenta mucho y unas no se cargan, este es el codigo que uso:
Código PHP:
<?php
if(isset($_GET['id_img'])){

$datosimg mysql_fetch_array(mysql_query("SELECT * FROM galerias WHERE id='".$_GET['id_img']."'"));

$anchura $w_img;
$hmax $h_img;

$nombre$datosimg['foto'];
$datos getimagesize($nombre);

//////////////-[ Marca de Agua ]-///////////////////
if($datosimg['tipo'] == "videos"){
  
$watermarksrc "wm_videos.png";
}else{
  
$watermarksrc "wm_fotos.png";
}

$marcadeagua imagecreatefrompng($watermarksrc);
/////////////////////////////////

if($datos[2]==1){$img = @imagecreatefromgif($nombre);}
if(
$datos[2]==2){$img = @imagecreatefromjpeg($nombre);}
if(
$datos[2]==3){$img = @imagecreatefrompng($nombre);}

if(
$datos[1] > $hmax){
$ratio = ($datos[0] / $anchura);
 if(
$altura>$hmax){
         
$anchura2=$hmax*$anchura/$altura;
         
$altura=$hmax;
         
$anchura=$anchura2;
         }

}
$thumb imagecreatetruecolor($anchura,$hmax);
$bgcolorimg ImageColorAllocate($thumb255212251);
ImageFill($thumb00$bgcolorimg);
imagecopyresampled($thumb$img0000$anchura$hmax$datos[0], $datos[1]);
ImageCopy($thumb$marcadeagua0000110150);



if(
$datos[2]==1){header("Content-type: image/gif"); imagegif($thumb);}
if(
$datos[2]==2){header("Content-type: image/jpeg");imagejpeg($thumb);}
if(
$datos[2]==3){header("Content-type: image/png");imagepng($thumb); }

ImageDestroy($img);
ImageDestroy($marcadeagua);
ImageDestroy($thumb);
}
// dormir por 10 segundos
sleep(3);
?>
que le tendria que hacer para que se carguen todas por lomenos?

Última edición por GreenLink; 10/06/2006 a las 09:58