Ver Mensaje Individual
  #10 (permalink)  
Antiguo 08/01/2004, 09:06
jmaribau
 
Fecha de Ingreso: enero-2004
Mensajes: 235
Antigüedad: 22 años, 9 meses
Puntos: 0
La verdad es que no creo que esto sea un error de programación. Me parece que no me hago entender. A mi las imagenes me las crea bien, es cuando se ven en el navegador y las quiero guardar con "Guardar imagen como.." el texto que me aparece es el nombre del archivo php que ha creado dinámicamente y no el que me guastaria a mi que es el nombre de la imagen original. Se ha entendido?

Aqui teneis el código.
Codigo html:
Código:
<img src='/welog/imagelist.php?&amp;m=0&amp;src=uploaded_images/image3.jpg&amp;width=149&amp;height=150' width=149 height=150  />
Codigo php (imagelist.php):
Código PHP:
if ($_GET['src']) {
    
Header( "Content-type: image/jpeg");
    
$valores = array('method', 'ruta', 'ancho', 'alto', 'guardar', 'calidad');
    
$i=0;
    foreach (
$_GET as $key=>$val) {
        $
$valores[$i++]=$val;
    }
    if (!
$calidad) $calidad = 85;
    
    
$fuente = ImageCreateFromJpeg($ruta); 
    
$imgAncho = ImageSx($fuente); 
    
$imgAlto =ImageSy($fuente);
    
$func='imagecreatetruecolor';
    if (!
function_exists($func)) { 
        
$imagen=ImageCreate($ancho,$alto);
        
ImageCopyResized( $imagen, $fuente, 0, 0, 0, 0, $ancho, $alto, $imgAncho, $imgAlto);
    } else {
        
$imagen = ImageCreateTrueColor($ancho,$alto);
        if (
$metod) ImageCopyResized( $imagen, $fuente, 0, 0, 0, 0, $ancho, $alto, $imgAncho, $imgAlto);      
        else 
ImageCopyResampled( $imagen, $fuente, 0, 0, 0, 0, $ancho, $alto, $imgAncho, $imgAlto); 
    }
    
ImageJpeg($imagen,$guardar,$calidad);
    
imageDestroy($imagen);
}