Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/01/2005, 20:17
Avatar de Reynier
Reynier
 
Fecha de Ingreso: noviembre-2002
Ubicación: Por ahí en algún sitio
Mensajes: 1.844
Antigüedad: 21 años, 5 meses
Puntos: 1
Problemas con creación de imagenes

Tengo este código en un archivo llamado thumbnails.php y la llamada la hago de esta forma:
thumbnails.php?modulo=fondos&t=thumbs&do=false&ima gen=1
y hasta ahi todo bien pero cuando llamo a la imagen numero 11
thumbnails.php?modulo=fondos&t=thumbs&do=false&ima gen=11
me retorna este error:
Cita:
La imagen “http://localhost/jclub/libraries/thu...lse&imagen=11” no puede mostrarse porque contiene errores.
que puede ser?? Si se dan cuenta tengo algo comentariado en el código pues antes lo tenia asi pero revise un POST que hice algun tiempo y corregi el detalle pero sigue sin mostrarme las demas imagenes.
Código PHP:
$query "SELECT imagen FROM fondosdeescritorio WHERE (idcategoria=".$idimg.")";
    
$result mysql_query($query) or die(_DBERR mysql_error());
    
$imagen mysql_fetch_assoc($result); // mysql_result($result,0,"imagen");
    
if($do == "true"){
     
header ("Content-type: image/jpeg");
     echo 
$imagen;
    }elseif(
$do == "false"){
     
header ("Content-type: image/jpeg");
     
$img imagecreatefromstring($imagen['imagen']);
     
$picsize 123;
     
$new_w imagesx($img);
     
$new_h imagesy($img);
     
$aspect_ratio $new_h $new_w;
     
$new_w $picsize;
     
$new_h abs($new_w $aspect_ratio);
     
$dst_img imagecreatetruecolor($new_w,$new_h);   imagecopyresampled($dst_img,$img,0,0,0,0,$new_w,$new_h,imagesx($img),imagesy($img));
     
imagejpeg($dst_img,'',100);
     
imagedestroy($dst_img); 
Salu2
__________________
Ing. Reynier Pérez Mira